-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui-kit): Selection에 Disabled 안 먹는 이슈 수정 (#86)
- Loading branch information
Showing
9 changed files
with
149 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { ProgressBarLabelPosition } from 'src/components/ProgressBar'; | ||
|
||
export const MAX_VALUE = 100; | ||
export const labelPosition: ProgressBarLabelPosition[] = ['top', 'bottom', 'left', 'right']; |
31 changes: 31 additions & 0 deletions
31
ui-kit/src/stories/Components/ProgressBar/index.stories.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; | ||
import { ProgressBar } from 'src'; | ||
import { Preview, Label, LabelFormatter } from './Components'; | ||
|
||
<Meta title="Components/ProgressBar" components={ProgressBar} /> | ||
|
||
# ProgressBar | ||
|
||
## Preview | ||
|
||
<Canvas> | ||
<Story name="Preview"> | ||
<Preview /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Label | ||
|
||
<Canvas> | ||
<Story name="Label"> | ||
<Label /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Label Formatter | ||
|
||
<Canvas> | ||
<Story name="Label Formatter"> | ||
<LabelFormatter /> | ||
</Story> | ||
</Canvas> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Radio } from 'src'; | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; | ||
|
||
<Meta title="Components/Radio" components={Radio} /> | ||
|
||
# Radio | ||
|
||
## Preview | ||
|
||
<Canvas> | ||
<Story name="Preview"> | ||
<Radio label="라디오1" name="radio" /> | ||
<Radio label="라디오2" name="radio" /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Disabled | ||
|
||
<Canvas> | ||
<Story name="Disabled"> | ||
<Radio label="라디오1" name="radio" /> | ||
<Radio label="라디오2" name="radio" /> | ||
<Radio label="라디오3" name="radio" disabled /> | ||
<Radio label="라디오4" name="radio" defaultChecked={true} disabled /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Inline | ||
|
||
<Canvas> | ||
<Story name="Inline"> | ||
<Radio display="inline" label="라디오1" name="radio" style={{ marginRight: 16 }} /> | ||
<Radio display="inline" label="라디오2" name="radio" /> | ||
</Story> | ||
</Canvas> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React, { useState } from 'react'; | ||
import { Selection, Text } from 'src'; | ||
|
||
export const Preview = () => { | ||
const [state, setState] = useState(''); | ||
|
||
return ( | ||
<div> | ||
<Selection onChange={(e) => setState(e.target.value)}> | ||
<option>옵션1</option> | ||
<option>옵션2</option> | ||
<option>옵션3</option> | ||
</Selection> | ||
<Text style={{ display: 'block' }}>선택된 값은 {state}입니다.</Text> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; | ||
import { Selection, Text } from 'src'; | ||
import { Preview } from './Components'; | ||
|
||
<Meta title="Components/Selection" components={Selection} /> | ||
|
||
# Selection | ||
|
||
## Preview | ||
|
||
<Canvas> | ||
<Story name="Preview"> | ||
<Preview /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Sizes | ||
|
||
<Canvas> | ||
<Story name="Sizes"> | ||
<ul> | ||
{['small', 'medium', 'large'].map((size) => ( | ||
<li key={size} style={{ marginBottom: 16, listStyle: ' none' }}> | ||
<Selection placeholder={size} size={size}> | ||
<option>옵션1</option> | ||
<option>옵션2</option> | ||
<option>옵션3</option> | ||
</Selection> | ||
</li> | ||
))} | ||
</ul> | ||
</Story> | ||
</Canvas> | ||
|
||
## Disabled | ||
|
||
<Canvas> | ||
<Story name="Disabled"> | ||
<Selection disabled> | ||
<option>옵션1</option> | ||
<option>옵션2</option> | ||
<option>옵션3</option> | ||
</Selection> | ||
</Story> | ||
</Canvas> | ||
|
||
## Placeholder | ||
|
||
<Canvas> | ||
<Story name="Placeholder"> | ||
<Selection placeholder="어느 곳에 사시나요?"> | ||
<option>서울</option> | ||
<option>경기</option> | ||
<option>인천</option> | ||
<option>충남</option> | ||
</Selection> | ||
</Story> | ||
</Canvas> |