diff --git a/.storybook/main.js b/.storybook/main.js index 7d6f728..12d269f 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -6,11 +6,11 @@ module.exports = { '@storybook/addon-interactions', '@storybook/addon-mdx-gfm', ], - framework: { - name: '@storybook/react-webpack5', - options: {}, - }, docs: { autodocs: true, }, + framework: { + name: '@storybook/react-vite', + options: {}, + }, }; diff --git a/.storybook/preview.js b/.storybook/preview.jsx similarity index 100% rename from .storybook/preview.js rename to .storybook/preview.jsx diff --git a/package.json b/package.json index c18d9ea..dc052f6 100644 --- a/package.json +++ b/package.json @@ -33,13 +33,13 @@ "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", "@babel/runtime-corejs3": "^7.19.6", - "@storybook/addon-actions": "^7.0.7", - "@storybook/addon-essentials": "^7.0.7", - "@storybook/addon-interactions": "^7.0.7", - "@storybook/addon-links": "^7.0.7", - "@storybook/addon-mdx-gfm": "^7.0.7", - "@storybook/react": "^7.0.7", - "@storybook/react-webpack5": "^7.0.7", + "@storybook/addon-actions": "^7.0.18", + "@storybook/addon-essentials": "^7.0.18", + "@storybook/addon-interactions": "^7.0.18", + "@storybook/addon-links": "^7.0.18", + "@storybook/addon-mdx-gfm": "^7.0.18", + "@storybook/react": "^7.0.18", + "@storybook/react-vite": "^7.0.18", "@storybook/testing-library": "^0.1.0", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", @@ -59,17 +59,16 @@ "eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-react": "^7.31.10", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-storybook": "^0.6.11", + "eslint-plugin-storybook": "^0.6.12", "husky": "^8.0.0", "lerna": "^6.0.1", "lint-staged": "^13.0.4", "prettier": "^2.7.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "storybook": "^7.0.7", + "storybook": "^7.0.18", "styled-components": "^5.3.6", "typescript": "^4.8.4", "vite": "^4.3.5" - }, - "dependencies": {} + } } diff --git a/packages/primitives/src/components/Dropdown/dropdown.stories.tsx b/packages/primitives/src/components/Dropdown/dropdown.stories.tsx index c3c8804..473ead7 100644 --- a/packages/primitives/src/components/Dropdown/dropdown.stories.tsx +++ b/packages/primitives/src/components/Dropdown/dropdown.stories.tsx @@ -1,17 +1,17 @@ -import { ComponentStory, ComponentMeta } from '@storybook/react'; +import { StoryFn, Meta } from '@storybook/react'; import { Dropdown } from '.'; export default { title: 'Primitives/DropDown', component: Dropdown, -} as ComponentMeta; +} as Meta; const handleClick = () => { console.log('dropdown Item click'); }; -export const Default: ComponentStory = () => ( +export const Default: StoryFn = () => ( diff --git a/packages/primitives/src/components/IntersectListener/intersectListener.stories.tsx b/packages/primitives/src/components/IntersectListener/intersectListener.stories.tsx index d110867..df798f3 100644 --- a/packages/primitives/src/components/IntersectListener/intersectListener.stories.tsx +++ b/packages/primitives/src/components/IntersectListener/intersectListener.stories.tsx @@ -1,4 +1,4 @@ -import { ComponentMeta, ComponentStory } from '@storybook/react'; +import { StoryFn, Meta } from '@storybook/react'; import { useEffect, useState } from 'react'; import { IntersectListener } from '.'; @@ -6,7 +6,7 @@ import { IntersectListener } from '.'; export default { title: 'Primitives/IntersectListener', component: IntersectListener, -} as ComponentMeta; +} as Meta; const Card = ({ number }) => (
datas[page]; -export const Default: ComponentStory = () => { +export const Default: StoryFn = () => { const [page, setPage] = useState(0); const [elements, setElements] = useState(getData(0)); diff --git a/packages/primitives/src/components/Tab/tab.stories.tsx b/packages/primitives/src/components/Tab/tab.stories.tsx index 39b15ca..c658dd9 100644 --- a/packages/primitives/src/components/Tab/tab.stories.tsx +++ b/packages/primitives/src/components/Tab/tab.stories.tsx @@ -1,11 +1,11 @@ -import { ComponentMeta } from '@storybook/react'; +import { Meta } from '@storybook/react'; import { Tab } from '.'; export default { title: 'Primitives/Tab', component: Tab, -} as ComponentMeta; +} as Meta; export const Basic = () => ( diff --git a/packages/primitives/src/components/TextArea/textArea.stories.tsx b/packages/primitives/src/components/TextArea/textArea.stories.tsx index 03711da..3540067 100644 --- a/packages/primitives/src/components/TextArea/textArea.stories.tsx +++ b/packages/primitives/src/components/TextArea/textArea.stories.tsx @@ -1,14 +1,10 @@ -import { ComponentStory, ComponentMeta } from '@storybook/react'; +import { Meta } from '@storybook/react'; import { TextArea } from '.'; export default { title: 'Primitives/TextArea', component: TextArea, -} as ComponentMeta; +} as Meta; -const Template: ComponentStory = (args) => ( -