diff --git a/packages/design-system/src/components/index.ts b/packages/design-system/src/components/index.ts index ffe13dde..6dd19618 100644 --- a/packages/design-system/src/components/index.ts +++ b/packages/design-system/src/components/index.ts @@ -1,3 +1,4 @@ export { default as Button } from './button/Button'; export { Switch } from './switch/switch'; export { default as Input } from './input/Input'; +export { Textarea } from './textarea/Textarea'; diff --git a/packages/design-system/src/components/textarea/Textarea.stories.tsx b/packages/design-system/src/components/textarea/Textarea.stories.tsx new file mode 100644 index 00000000..2687c4c8 --- /dev/null +++ b/packages/design-system/src/components/textarea/Textarea.stories.tsx @@ -0,0 +1,110 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; +import { within, userEvent, expect } from '@storybook/test'; +import { Textarea } from './Textarea'; + +const meta: Meta = { + title: 'Components/Textarea', + component: Textarea, + tags: ['autodocs'], + parameters: { + layout: 'centered', + docs: { + description: { + component: + '고정 크기 **h-[12rem] / w-[24.8rem]** · 기본 **500자** 제한 · 내용 초과 시 내부 스크롤이 나타나는 텍스트영역입니다. ' + + '`maxLength`로 글자수 제한을 변경할 수 있습니다.', + }, + }, + }, + argTypes: { + className: { table: { disable: true } }, + maxLength: { control: { type: 'number', min: 1 } }, + placeholder: { control: 'text' }, + defaultValue: { control: 'text' }, + }, + args: { + placeholder: '나중에 내가 꺼내줄 수 있게 살짝 적어줘!', + maxLength: 500, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Basic: Story = { + render: (args) =>