From 07bd8f9d5099d935bae26a54df9838a84144d2a7 Mon Sep 17 00:00:00 2001 From: KIMSEI1124 Date: Sat, 9 Nov 2024 16:08:29 +0900 Subject: [PATCH] =?UTF-8?q?Feat(#38):=20Input=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EB=B0=8F=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Common/Input/Input.styled.ts | 6 ++++++ src/components/Common/Input/Input.tsx | 19 +++++++++++++++++++ src/stories/Common/Input.stories.tsx | 17 +++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 src/components/Common/Input/Input.styled.ts create mode 100644 src/components/Common/Input/Input.tsx create mode 100644 src/stories/Common/Input.stories.tsx diff --git a/src/components/Common/Input/Input.styled.ts b/src/components/Common/Input/Input.styled.ts new file mode 100644 index 0000000..da4cd6f --- /dev/null +++ b/src/components/Common/Input/Input.styled.ts @@ -0,0 +1,6 @@ +export interface InputStyling { + $width?: string; + $isValid?: boolean; + $void?: boolean; + $resize?: boolean; +} diff --git a/src/components/Common/Input/Input.tsx b/src/components/Common/Input/Input.tsx new file mode 100644 index 0000000..c4afc52 --- /dev/null +++ b/src/components/Common/Input/Input.tsx @@ -0,0 +1,19 @@ +import { ComponentPropsWithRef } from 'react'; + +import type { InputStyling } from './Input.styled'; + +export interface InputProps extends ComponentPropsWithRef<'input'> { + styles: InputStyling; +} + +function Input({ styles }: InputProps) { + const Tag = 'input'; + + return ( +
+ +
+ ); +} + +export default Input; diff --git a/src/stories/Common/Input.stories.tsx b/src/stories/Common/Input.stories.tsx new file mode 100644 index 0000000..63ed187 --- /dev/null +++ b/src/stories/Common/Input.stories.tsx @@ -0,0 +1,17 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import Input from '@/components/Common/Input/Input'; + +const meta: Meta = { + title: 'Common/Input', + component: Input, + tags: ['autodocs'], + args: { + styles: {}, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = {};