feat: add basic webui
This commit is contained in:
53
apps/storybook/.storybook/preview.tsx
Normal file
53
apps/storybook/.storybook/preview.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import { Toaster } from '@konobangu/design-system/components/ui/sonner';
|
||||
import { TooltipProvider } from '@konobangu/design-system/components/ui/tooltip';
|
||||
import { ThemeProvider } from '@konobangu/design-system/providers/theme';
|
||||
import { withThemeByClassName } from '@storybook/addon-themes';
|
||||
import type { Preview } from '@storybook/react';
|
||||
|
||||
import '@konobangu/design-system/styles/globals.css';
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
chromatic: {
|
||||
modes: {
|
||||
light: {
|
||||
theme: 'light',
|
||||
className: 'light',
|
||||
},
|
||||
dark: {
|
||||
theme: 'dark',
|
||||
className: 'dark',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
withThemeByClassName({
|
||||
themes: {
|
||||
light: 'light',
|
||||
dark: 'dark',
|
||||
},
|
||||
defaultTheme: 'light',
|
||||
}),
|
||||
(Story) => {
|
||||
return (
|
||||
<div className="bg-background">
|
||||
<ThemeProvider>
|
||||
<TooltipProvider>
|
||||
<Story />
|
||||
</TooltipProvider>
|
||||
<Toaster />
|
||||
</ThemeProvider>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in New Issue
Block a user