35 lines
No EOL
677 B
TypeScript
35 lines
No EOL
677 B
TypeScript
import type { Preview } from '@storybook/nextjs-vite'
|
|
|
|
import { defaultFont, headerFont } from '@/assets/fonts'
|
|
|
|
const preview: Preview = {
|
|
decorators: [
|
|
(Story) => {
|
|
return (
|
|
<div
|
|
className={defaultFont.className}
|
|
style={{
|
|
fontSize: 'var(--font-size-body)',
|
|
'--header-font': headerFont.style.fontFamily,
|
|
} as React.CSSProperties}
|
|
>
|
|
<Story />
|
|
</div>
|
|
)
|
|
},
|
|
],
|
|
parameters: {
|
|
nextjs: {
|
|
appDirectory: true,
|
|
},
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/i,
|
|
},
|
|
},
|
|
},
|
|
|
|
}
|
|
|
|
export default preview |