From 3b984566beedb8d5cfc58b857e485a283b9f830f Mon Sep 17 00:00:00 2001 From: cla6shade Date: Fri, 4 Oct 2024 13:53:20 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=98=84=EC=9E=AC=EC=9D=98=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=20=EA=B5=AC=EC=A1=B0=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EA=B2=8C=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .storybook/preview.ts | 14 -------------- .../ui/Grid => components/grid}/index.stories.tsx | 0 src/{shared/ui/Grid => components/grid}/index.tsx | 2 +- .../spacing}/index.stories.tsx | 0 .../ui/Spacing => components/spacing}/index.tsx | 2 +- src/shared/ui/index.ts | 2 -- yarn.lock | 12 ++++++++++++ 7 files changed, 14 insertions(+), 18 deletions(-) delete mode 100644 .storybook/preview.ts rename src/{shared/ui/Grid => components/grid}/index.stories.tsx (100%) rename src/{shared/ui/Grid => components/grid}/index.tsx (95%) rename src/{shared/ui/Spacing => components/spacing}/index.stories.tsx (100%) rename src/{shared/ui/Spacing => components/spacing}/index.tsx (95%) delete mode 100644 src/shared/ui/index.ts diff --git a/.storybook/preview.ts b/.storybook/preview.ts deleted file mode 100644 index 37914b1..0000000 --- a/.storybook/preview.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Preview } from "@storybook/react"; - -const preview: Preview = { - parameters: { - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/i, - }, - }, - }, -}; - -export default preview; diff --git a/src/shared/ui/Grid/index.stories.tsx b/src/components/grid/index.stories.tsx similarity index 100% rename from src/shared/ui/Grid/index.stories.tsx rename to src/components/grid/index.stories.tsx diff --git a/src/shared/ui/Grid/index.tsx b/src/components/grid/index.tsx similarity index 95% rename from src/shared/ui/Grid/index.tsx rename to src/components/grid/index.tsx index 3b5335a..d6005b6 100644 --- a/src/shared/ui/Grid/index.tsx +++ b/src/components/grid/index.tsx @@ -9,6 +9,7 @@ const vars = { }; type ResponseGridStyle = { + // eslint-disable-next-line [key in keyof typeof vars]?: number; }; @@ -41,7 +42,6 @@ const Wrapper = styled.div>( export default function Grid({ children, columns, ...props }: Props): JSX.Element { return ( - // eslint-disable-next-line react/jsx-props-no-spreading {children} diff --git a/src/shared/ui/Spacing/index.stories.tsx b/src/components/spacing/index.stories.tsx similarity index 100% rename from src/shared/ui/Spacing/index.stories.tsx rename to src/components/spacing/index.stories.tsx diff --git a/src/shared/ui/Spacing/index.tsx b/src/components/spacing/index.tsx similarity index 95% rename from src/shared/ui/Spacing/index.tsx rename to src/components/spacing/index.tsx index 5eb3e22..538c059 100644 --- a/src/shared/ui/Spacing/index.tsx +++ b/src/components/spacing/index.tsx @@ -9,6 +9,7 @@ const vars = { }; type ResponseGridStyle = { + // eslint-disable-next-line [key in keyof typeof vars]?: number; }; @@ -37,6 +38,5 @@ const Wrapper = styled.div>( ); export default function Spacing({ height, backgroundColor = 'inherit', ...props }: Props) { - // eslint-disable-next-line react/jsx-props-no-spreading return ; } diff --git a/src/shared/ui/index.ts b/src/shared/ui/index.ts deleted file mode 100644 index 8990866..0000000 --- a/src/shared/ui/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Grid from './Grid'; -export * as Spacing from './Spacing'; diff --git a/yarn.lock b/yarn.lock index a792c9c..59dabe4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3653,6 +3653,7 @@ __metadata: resolution: "ditto-frontend@workspace:." dependencies: "@chromatic-com/storybook": "npm:1.9.0" + "@emotion/babel-plugin": "npm:^11.12.0" "@emotion/react": "npm:^11.13.3" "@emotion/styled": "npm:^11.13.0" "@eslint/js": "npm:^9.9.0" @@ -3672,6 +3673,7 @@ __metadata: "@typescript-eslint/eslint-plugin": "npm:7.0.0" "@typescript-eslint/parser": "npm:^8.6.0" "@vitejs/plugin-react-swc": "npm:^3.5.0" + emotion-normalize: "npm:^11.0.1" eslint: "npm:8.57.0" eslint-config-airbnb: "npm:^19.0.4" eslint-config-airbnb-typescript: "npm:^18.0.0" @@ -3774,6 +3776,16 @@ __metadata: languageName: node linkType: hard +"emotion-normalize@npm:^11.0.1": + version: 11.0.1 + resolution: "emotion-normalize@npm:11.0.1" + peerDependencies: + "@emotion/react": ^11.0.0 + react: ">=16.3.0" + checksum: 10c0/19254ff13d12f463b5dc91b33c1a961f6bf4cefd1011979c1f8889cb84d8e86b83c770b516ec22a379142f9e8833e3d1e99e1c6052947d24ed13cc2abe8f5779 + languageName: node + linkType: hard + "encodeurl@npm:~1.0.2": version: 1.0.2 resolution: "encodeurl@npm:1.0.2"