Skip to content

Commit

Permalink
feat: basic storybook setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzy-mankowski committed Dec 12, 2024
1 parent 855b46c commit 43df0ff
Show file tree
Hide file tree
Showing 7 changed files with 8,181 additions and 1,586 deletions.
2 changes: 1 addition & 1 deletion packages/react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['standard', 'standard-react', 'plugin:@typescript-eslint/eslint-recommended'],
extends: ['standard', 'standard-react', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:storybook/recommended'],
env: {
node: true
},
Expand Down
2 changes: 2 additions & 0 deletions packages/react/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ playground/node_modules
coverage
src/react-app-env.d.ts
*.tgz

*storybook.log
21 changes: 21 additions & 0 deletions packages/react/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { StorybookConfig } from '@storybook/react-webpack5';

// const { build } = require("@storybook/core-server");
// const options = {};
// build(options).then(() => console.log("done"));

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

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
Loading

0 comments on commit 43df0ff

Please sign in to comment.