Skip to content

Commit

Permalink
refactor: story container
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Feb 4, 2024
1 parent 448b249 commit 3025018
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion stories/GlobalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ScrollContainer = styled.ScrollView`
`;

export const StoryTitle = styled.Text`
margin: 8px 0;
margin: 8px 0 24px;
font-size: 18px;
font-family: Pretendard-Bold;
color: ${({theme}) => theme.text.basic};
Expand Down
10 changes: 5 additions & 5 deletions stories/uis/AccordionStories/AccordionBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const ScrollContainer = styled.ScrollView`

function AccordionBasic(props: ComponentProps<typeof Accordion>): JSX.Element {
return (
<ScrollContainer>
<StoryContainer>
<StoryTitle style={{fontSize: 18, marginBottom: 8}}>Basic</StoryTitle>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<ScrollContainer>
<Accordion {...props} />
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
14 changes: 7 additions & 7 deletions stories/uis/AccordionStories/AccordionCustomStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ function AccordionCustom(props): JSX.Element {
const {theme} = useDooboo();

return (
<ScrollContainer>
<StoryContainer>
<StoryTitle style={{fontSize: 18, marginBottom: 8}}>
Custom Style
</StoryTitle>
<StoryContainer>
<StoryTitle style={{fontSize: 18, marginBottom: 8}}>
Custom Style
</StoryTitle>
<ScrollContainer>
<Accordion<AccordionTitle, AccordionItem>
onPressItem={action('onPressItem')}
renderItem={({text}) => {
Expand Down Expand Up @@ -111,8 +111,8 @@ function AccordionCustom(props): JSX.Element {
toggleElementPosition="left"
{...props}
/>
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
10 changes: 5 additions & 5 deletions stories/uis/ButtonGroupStories/ButtonGroupBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ function ButtonGroupBasic(
props: ComponentProps<typeof ButtonGroup>,
): JSX.Element {
return (
<ScrollView contentContainerStyle={{flexDirection: 'column'}}>
<StoryContainer>
<StoryTitle style={{fontSize: 18, marginBottom: 8}}>Basic</StoryTitle>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<ScrollView contentContainerStyle={{flexDirection: 'column'}}>
<ButtonGroup {...props} />
</StoryContainer>
</ScrollView>
</ScrollView>
</StoryContainer>
);
}

Expand Down
20 changes: 10 additions & 10 deletions stories/uis/CheckboxStories/CheckboxBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ function CheckboxBasicStory(): JSX.Element {
const [checked, setChecked] = useState<boolean>(false);

return (
<ScrollContainer
contentContainerStyle={{
justifyContent: 'center',
alignItems: 'center',
}}
>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<ScrollContainer
contentContainerStyle={{
justifyContent: 'center',
alignItems: 'center',
}}
>
<Checkboxes checked={checked} setChecked={setChecked} />
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
22 changes: 11 additions & 11 deletions stories/uis/EditTextStories/EditTextBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ function EditTextBasicStory(): JSX.Element {
};

return (
<ScrollContainer
contentContainerStyle={{
justifyContent: 'center',
alignItems: 'center',
}}
scrollIndicatorInsets={{right: 0}}
>
<StoryContainer>
<Typography.Heading1>EditText</Typography.Heading1>
<StoryContainer>
<Typography.Heading1>EditText</Typography.Heading1>
<ScrollContainer
contentContainerStyle={{
justifyContent: 'center',
alignItems: 'center',
}}
scrollIndicatorInsets={{right: 0}}
>
<EditText
editable={boolean('editable', true)}
onChangeText={(str) => onTextChanged(str)}
Expand Down Expand Up @@ -229,8 +229,8 @@ function EditTextBasicStory(): JSX.Element {
style={{marginTop: 20, marginBottom: 80}}
value={text}
/>
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
8 changes: 4 additions & 4 deletions stories/uis/RadioGroupStories/RadioGroupBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function RadioButtonBasicStory({
const [selectedValue, setSelectedValue] = useState<string>(data?.[0]);

return (
<ScrollContainer>
<StoryContainer>
<StoryContainer>
<ScrollContainer>
<View style={{flexDirection: 'row', marginTop: 24}}>
<RadioGroup
data={data}
Expand All @@ -28,8 +28,8 @@ function RadioButtonBasicStory({
type={type}
/>
</View>
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
10 changes: 5 additions & 5 deletions stories/uis/SwitchToggleStories/SwitchToggleBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function SwitchToggleBasicStory(): JSX.Element {
const {theme} = useTheme();

return (
<ScrollContainer>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<StoryContainer>
<StoryTitle>Basic</StoryTitle>
<ScrollContainer>
<SwitchToggle isOn={on} onPress={() => off(!on)} />

<View style={{height: 40}} />
Expand Down Expand Up @@ -50,8 +50,8 @@ function SwitchToggleBasicStory(): JSX.Element {
},
}}
/>
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down
10 changes: 5 additions & 5 deletions stories/uis/TypographyStories/TypographyBasicStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {ScrollContainer, StoryContainer} from '../../GlobalStyles';

function TypographyBasicStory(): JSX.Element {
return (
<ScrollContainer>
<StoryContainer>
<Typography.Title>Title</Typography.Title>
<StoryContainer>
<Typography.Title>Title</Typography.Title>
<ScrollContainer>
<View style={{height: 8}} />
<Typography.Heading1>Heading1</Typography.Heading1>
<View style={{height: 8}} />
Expand All @@ -28,8 +28,8 @@ function TypographyBasicStory(): JSX.Element {
<Typography.Body3>Body3</Typography.Body3>
<View style={{height: 8}} />
<Typography.Body4>Body4</Typography.Body4>
</StoryContainer>
</ScrollContainer>
</ScrollContainer>
</StoryContainer>
);
}

Expand Down

0 comments on commit 3025018

Please sign in to comment.