Skip to content

Commit

Permalink
feat: search-field 스토리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
DongjaJ committed Jan 16, 2025
1 parent e7336dd commit 334e30e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/ui/search-field/search-field.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import type { Meta, StoryObj } from '@storybook/react';
import { SearchField } from './search-field.tsx';

const meta: Meta = {
title: 'ui/SearchField',
component: SearchField,
parameters: {
layout: 'centered',
},
argTypes: {
hasResetButton: {
control: {
type: 'boolean',
},
},
variant: {
options: ['default', 'home'],
control: {
type: 'radio',
},
},
},
tags: ['autodocs'],
} satisfies Meta<typeof SearchField>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Primary: Story = {
args: {
label: 'Default',
hasResetButton: true,
},
};

export const Secondary: Story = {
args: {
label: 'With Placeholder',
placeholder: '건강 불편 증상을 검색해 보세요',
},
};

export const Home: Story = {
args: {
label: 'Home',
value: 'Home에서 검색 창',
variant: 'home',
},
};

0 comments on commit 334e30e

Please sign in to comment.