Skip to content

Commit d12d5b3

Browse files
authored
chore(web_common): add base styling + storybook (#5163)
1 parent 21f06dd commit d12d5b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6633
-18
lines changed

pnpm-lock.yaml

Lines changed: 351 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/common/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules/
22
dist
33
tsconfig.tsbuildinfo
4+
5+
*storybook.log
6+
storybook-static

web/common/.storybook/main.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { StorybookConfig } from '@storybook/react-vite'
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: [
6+
'@storybook/addon-essentials',
7+
'@storybook/addon-docs',
8+
'@storybook/addon-onboarding',
9+
],
10+
framework: {
11+
name: '@storybook/react-vite',
12+
options: {},
13+
},
14+
}
15+
export default config

web/common/.storybook/preview.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { Preview } from '@storybook/react-vite'
2+
import '../src/styles/index.css'
3+
4+
const preview: Preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/i,
10+
},
11+
},
12+
},
13+
}
14+
15+
export default preview

web/common/eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2+
import storybook from 'eslint-plugin-storybook'
3+
14
import eslint from '@eslint/js'
25
import tseslint from 'typescript-eslint'
36

@@ -13,4 +16,5 @@ export default tseslint.config(
1316
'no-empty': 'off',
1417
},
1518
},
19+
storybook.configs['flat/recommended'],
1620
)

0 commit comments

Comments
 (0)