Skip to content

Commit

Permalink
fix: storybook에서 pretendard 폰트가 적용되도록 스토리북 preview.tsx 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
soi-ha committed Oct 23, 2024
1 parent ed86ba4 commit 7b33682
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions client/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import type {Preview} from '@storybook/react';
import {HDesignProvider} from '../src/components/Design';
import {css, Global} from '@emotion/react';

const preview: Preview = {
parameters: {
Expand Down Expand Up @@ -30,11 +31,23 @@ const preview: Preview = {
},
},
decorators: [
Story => (
<HDesignProvider>
<Story />
</HDesignProvider>
),
Story => {
return (
<div>
<Global
styles={css`
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
body {
font-family: 'Pretendard', sans-serif;
}
`}
/>
<HDesignProvider>
<Story />
</HDesignProvider>
</div>
);
},
],
};

Expand Down

0 comments on commit 7b33682

Please sign in to comment.