Skip to content

Commit

Permalink
chore: integrate storybook and add example story
Browse files Browse the repository at this point in the history
  • Loading branch information
kamui-fin committed Oct 31, 2023
1 parent b663810 commit 9ee6a6c
Show file tree
Hide file tree
Showing 7 changed files with 30,891 additions and 13,599 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'plugin:import/typescript',
'prettier',
'next/core-web-vitals',
'plugin:storybook/recommended',
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
Expand Down
19 changes: 19 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { StorybookConfig } from '@storybook/nextjs';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
docs: {
autodocs: 'tag',
},
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ npm install
NEXT_PUBLIC_VALIDATOR=http://127.0.0.1:5000
```

9. Generate `Prisma` client and run web server:
9. Setup pre-commit hooks:

```bash
npm run prepare
```

10. Generate `Prisma` client and run web server:

```bash
npm run prisma:generate
Expand Down
Loading

0 comments on commit 9ee6a6c

Please sign in to comment.