* Added base project to clients/web
* Added storybook build plan
This commit is contained in:
parent
b18b81bdeb
commit
fcd0d156f4
3 changed files with 108867 additions and 0 deletions
17
clients/web/.storybook/main.ts
Normal file
17
clients/web/.storybook/main.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { StorybookConfig } from '@storybook/react-vite';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
"stories": [
|
||||
"../src/**/*.mdx",
|
||||
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
||||
],
|
||||
"addons": [
|
||||
"@chromatic-com/storybook",
|
||||
"@storybook/addon-vitest",
|
||||
"@storybook/addon-a11y",
|
||||
"@storybook/addon-docs",
|
||||
"@storybook/addon-onboarding"
|
||||
],
|
||||
"framework": "@storybook/react-vite"
|
||||
};
|
||||
export default config;
|
||||
27
clients/web/.storybook/preview.tsx
Normal file
27
clients/web/.storybook/preview.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import type { Preview } from '@storybook/react-vite'
|
||||
import { MantineProvider } from '@mantine/core'
|
||||
import '@mantine/core/styles.css'
|
||||
import '@mantine/notifications/styles.css'
|
||||
|
||||
const preview: Preview = {
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<MantineProvider>
|
||||
<Story />
|
||||
</MantineProvider>
|
||||
),
|
||||
],
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
a11y: {
|
||||
test: 'todo',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default preview
|
||||
7
clients/web/.storybook/vitest.setup.ts
Normal file
7
clients/web/.storybook/vitest.setup.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview";
|
||||
import { setProjectAnnotations } from '@storybook/react-vite';
|
||||
import * as projectAnnotations from './preview';
|
||||
|
||||
// This is an important step to apply the right configuration when testing your stories.
|
||||
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
||||
setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]);
|
||||
Loading…
Reference in a new issue