Skip to content

Commit e57022d

Browse files
authored
Merge pull request #177 from ASAP-Lettering/chore/#176
2 parents 7c81591 + 7db87a0 commit e57022d

Some content is hidden

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

70 files changed

+6571
-795
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"next/core-web-vitals",
44
"airbnb",
55
"airbnb-typescript",
6-
"prettier"
6+
"prettier",
7+
"plugin:storybook/recommended"
78
],
89
"parserOptions": {
910
"project": "./tsconfig.json"
@@ -19,4 +20,4 @@
1920
"react/jsx-boolean-value": "off",
2021
"no-console": "off"
2122
}
22-
}
23+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ next-env.d.ts
3737

3838
.env
3939

40-
.prettierrc
40+
.prettierrc
41+
*storybook.log
42+
storybook-static

.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/nextjs';
2+
3+
const config: StorybookConfig = {
4+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5+
addons: [
6+
'@chromatic-com/storybook',
7+
'@storybook/addon-docs',
8+
'@storybook/addon-onboarding',
9+
'@storybook/addon-a11y'
10+
],
11+
framework: {
12+
name: '@storybook/nextjs',
13+
options: {}
14+
},
15+
staticDirs: ['../public']
16+
};
17+
export default config;

.storybook/preview.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ThemeProvider } from 'styled-components';
2+
import type { Preview } from '@storybook/react';
3+
import { theme } from '../src/styles/theme';
4+
5+
const preview: Preview = {
6+
parameters: {
7+
actions: { argTypesRegex: '^on[A-Z].*' },
8+
controls: {
9+
matchers: {
10+
color: /(background|color)$/i,
11+
date: /Date$/
12+
}
13+
}
14+
}
15+
};
16+
17+
export const decorators = [
18+
(Story) => (
19+
<ThemeProvider theme={theme}>
20+
<Story />
21+
</ThemeProvider>
22+
)
23+
];
24+
25+
export default preview;

0 commit comments

Comments
 (0)