-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storybook): add storybook docs (#197)
* feat(storybook): add storybook docs * fix(scripts): modify buildPrepare.js * fix(Form): add eslint disable to validation.js
- Loading branch information
1 parent
28d4a84
commit a060172
Showing
320 changed files
with
2,159 additions
and
2,625 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
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,159 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import View from '../View'; | ||
import Space from '../Space'; | ||
import Icon from '../Icon'; | ||
import Divider from '../Divider'; | ||
import Text from '../Text'; | ||
import Flex from '../Flex'; | ||
import Image from '../Image'; | ||
import Accordion from './Accordion'; | ||
|
||
const sampleText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Maecenas at elit eget diam convallis ultricies in a ligula. | ||
Nunc rutrum est ut risus laoreet laoreet. | ||
Donec convallis massa at pretium tincidunt. | ||
Quisque quis tellus quis odio venenatis bibendum. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Maecenas at elit eget diam convallis ultricies in a ligula. | ||
Nunc rutrum est ut risus laoreet laoreet. | ||
Donec convallis massa at pretium tincidunt. | ||
Quisque quis tellus quis odio venenatis bibendum. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Maecenas at elit eget diam convallis ultricies in a ligula. | ||
Nunc rutrum est ut risus laoreet laoreet. | ||
Donec convallis massa at pretium tincidunt. | ||
Quisque quis tellus quis odio venenatis bibendum. | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Maecenas at elit eget diam convallis ultricies in a ligula. | ||
Nunc rutrum est ut risus laoreet laoreet. | ||
Donec convallis massa at pretium tincidunt. | ||
Quisque quis tellus quis odio venenatis bibendum`; | ||
|
||
storiesOf('Accordion', module).addParameters({ | ||
component: Accordion, | ||
}) | ||
.add('Simple Accordion', () => ( | ||
<React.Fragment> | ||
<Space padding={[2]}> | ||
<Text size="xl" color="greyDarker">Simple Accordion</Text> | ||
</Space> | ||
<Accordion> | ||
<Accordion.Section> | ||
<Accordion.Section.Trigger> | ||
<Space padding={[2]}> | ||
<Flex | ||
flexDirection="row" | ||
alignItems="center" | ||
justifyContent="space-between" | ||
> | ||
<View> | ||
<Text size="s" weight="medium" color="greyDarker"> | ||
This is title1 | ||
</Text> | ||
<Icon name="keyboard_arrow_down" right /> | ||
</View> | ||
</Flex> | ||
</Space> | ||
</Accordion.Section.Trigger> | ||
<Accordion.Section.Content> | ||
<Space padding={[2]}> | ||
<View> | ||
<Image | ||
alt="img-1" | ||
src="https://images.treebohotels.com/files/Treebo_The_Galaxy/Oak/OAk_(4).jpg" | ||
height="200px" | ||
width="200px" | ||
/> | ||
{sampleText} | ||
</View> | ||
</Space> | ||
</Accordion.Section.Content> | ||
</Accordion.Section> | ||
<Divider /> | ||
<Accordion.Section> | ||
<Accordion.Section.Trigger> | ||
<Space padding={[2]}> | ||
<Flex | ||
flexDirection="row" | ||
alignItems="center" | ||
justifyContent="space-between" | ||
> | ||
<View> | ||
<Text size="s" weight="medium" color="greyDarker"> | ||
This is title2 | ||
</Text> | ||
<Icon name="keyboard_arrow_down" right /> | ||
</View> | ||
</Flex> | ||
</Space> | ||
</Accordion.Section.Trigger> | ||
<Accordion.Section.Content> | ||
<Space padding={[2]}> | ||
<View>{sampleText}</View> | ||
</Space> | ||
</Accordion.Section.Content> | ||
</Accordion.Section> | ||
</Accordion> | ||
</React.Fragment> | ||
)) | ||
.add('Multiple Accordions', () => ( | ||
<React.Fragment> | ||
<Space padding={[2]}> | ||
<Text size="xl" color="greyDarker">Accordion 1</Text> | ||
</Space> | ||
<Accordion> | ||
<Accordion.Section> | ||
<Accordion.Section.Trigger> | ||
<Space padding={[2]}> | ||
<Flex | ||
flexDirection="row" | ||
alignItems="center" | ||
justifyContent="space-between" | ||
> | ||
<View> | ||
<Text size="s" weight="medium" color="greyDarker"> | ||
This is title | ||
</Text> | ||
<Icon name="keyboard_arrow_down" right /> | ||
</View> | ||
</Flex> | ||
</Space> | ||
</Accordion.Section.Trigger> | ||
<Accordion.Section.Content> | ||
<Space padding={[2]}> | ||
<View>{sampleText}</View> | ||
</Space> | ||
</Accordion.Section.Content> | ||
</Accordion.Section> | ||
</Accordion> | ||
<Space padding={[2]}> | ||
<Text size="xl" color="greyDarker">Accordion 2</Text> | ||
</Space> | ||
<Accordion> | ||
<Accordion.Section> | ||
<Accordion.Section.Trigger> | ||
<Space padding={[2]}> | ||
<Flex | ||
flexDirection="row" | ||
alignItems="center" | ||
justifyContent="space-between" | ||
> | ||
<View> | ||
<Text size="s" weight="medium" color="greyDarker"> | ||
This is title | ||
</Text> | ||
<Icon name="keyboard_arrow_down" right /> | ||
</View> | ||
</Flex> | ||
</Space> | ||
</Accordion.Section.Trigger> | ||
<Accordion.Section.Content> | ||
<Space padding={[2]}> | ||
<View>{sampleText}</View> | ||
</Space> | ||
</Accordion.Section.Content> | ||
</Accordion.Section> | ||
</Accordion> | ||
</React.Fragment> | ||
)); |
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 @@ | ||
export default () => null; |
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
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.