Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
morewings committed Dec 3, 2023
1 parent 8172787 commit 9f6e8f5
Show file tree
Hide file tree
Showing 14 changed files with 366 additions and 227 deletions.
41 changes: 21 additions & 20 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import type { StorybookConfig } from '@storybook/react-vite';
import { withoutVitePlugins } from '@storybook/builder-vite'
import { withoutVitePlugins } from '@storybook/builder-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
async viteFinal(config) {
return {
...config,
plugins: await withoutVitePlugins(config.plugins, ['vite:dts']),
}
},
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
async viteFinal(config) {
return {
...config,
plugins: await withoutVitePlugins(config.plugins, ['vite:dts']),
}
},
};

export default config;
15 changes: 0 additions & 15 deletions .storybook/preview.ts

This file was deleted.

25 changes: 25 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { Preview } from '@storybook/react';
import {Provider} from './../src/lib/Provider';

import 'the-new-css-reset/css/reset.css';

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

export default preview;
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,19 @@
"dependencies": {
"classnames": "^2.3.2",
"css-vars-hook": "^0.6.19",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"the-new-css-reset": "^1.11.2"
},
"devDependencies": {
"@storybook/addon-essentials": "7.6.2",
"@storybook/addon-interactions": "7.6.2",
"@storybook/addon-links": "7.6.2",
"@storybook/blocks": "7.6.2",
"@storybook/react": "7.6.2",
"@storybook/react-vite": "7.6.2",
"@storybook/test": "7.6.2",
"@storybook/types": "7.6.2",
"@storybook/addon-essentials": "7.6.3",
"@storybook/addon-interactions": "7.6.3",
"@storybook/addon-links": "7.6.3",
"@storybook/blocks": "7.6.3",
"@storybook/builder-vite": "7.6.3",
"@storybook/react": "7.6.3",
"@storybook/react-vite": "7.6.3",
"@storybook/test": "7.6.3",
"@storybook/types": "7.6.3",
"@testing-library/jest-dom": "6.1.5",
"@testing-library/react": "14.1.2",
"@types/jest": "29.5.10",
Expand Down Expand Up @@ -97,8 +99,7 @@
"lint-staged": "15.1.0",
"npm-run-all": "4.1.5",
"postcss": "8.4.31",
"postcss-nesting": "^12.0.1",
"postcss-preset-env": "^9.3.0",
"postcss-preset-env": "9.3.0",
"prettier": "3.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -112,6 +113,6 @@
"ts-node": "10.9.1",
"typescript": "5.3.2",
"vite": "5.0.4",
"vite-plugin-dts": "^3.6.4"
"vite-plugin-dts": "3.6.4"
}
}
Loading

0 comments on commit 9f6e8f5

Please sign in to comment.