Skip to content

Commit 662e328

Browse files
committed
add storybook, styling, badge component
1 parent 57585b3 commit 662e328

Some content is hidden

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

65 files changed

+5936
-17
lines changed

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

4-
export default tseslint.config(
5-
eslint.configs.recommended,
6-
tseslint.configs.recommended,
7-
{
8-
rules: {
9-
'@typescript-eslint/no-explicit-any': 'off',
10-
'@typescript-eslint/no-unused-vars': 'off',
11-
'@typescript-eslint/no-empty-object-type': 'off',
12-
'@typescript-eslint/no-unused-expressions': 'off',
13-
'no-empty': 'off',
14-
},
7+
export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
8+
rules: {
9+
'@typescript-eslint/no-explicit-any': 'off',
10+
'@typescript-eslint/no-unused-vars': 'off',
11+
'@typescript-eslint/no-empty-object-type': 'off',
12+
'@typescript-eslint/no-unused-expressions': 'off',
13+
'no-empty': 'off',
1514
},
16-
)
15+
}, storybook.configs["flat/recommended"]);

0 commit comments

Comments
 (0)