2019-06-10 12:28:54 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { storiesOf } from '@storybook/react'
|
|
|
|
import withReadme from 'storybook-readme/with-readme'
|
|
|
|
import Readme from './README.md'
|
|
|
|
import { Container, Row, Col } from 'reactstrap';
|
2019-06-24 13:18:47 +00:00
|
|
|
import { GroupButton, DropDown, DropDownItem} from 'asc-web-components'
|
2019-06-10 12:28:54 +00:00
|
|
|
|
|
|
|
const rowStyle = { marginTop: 8 };
|
|
|
|
|
|
|
|
storiesOf('Components| DropDown', module)
|
|
|
|
.addDecorator(withReadme(Readme))
|
|
|
|
.add('base', () => (
|
|
|
|
<Container>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:04:35 +00:00
|
|
|
<Col xs="4">Only dropdown</Col>
|
2019-06-24 13:18:47 +00:00
|
|
|
<Col xs="2"/>
|
2019-06-10 12:28:54 +00:00
|
|
|
<Col>With Button</Col>
|
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:04:35 +00:00
|
|
|
<Col xs="4">
|
2019-06-24 13:18:47 +00:00
|
|
|
Without active button
|
2019-06-10 12:28:54 +00:00
|
|
|
<DropDown opened={true}>
|
2019-06-24 13:18:47 +00:00
|
|
|
<DropDownItem
|
|
|
|
label='Button 1'
|
|
|
|
onClick={() => console.log('Button 1 clicked')}
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 2'
|
|
|
|
onClick={() => console.log('Button 2 clicked')}
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 3'
|
|
|
|
onClick={() => console.log('Button 3 clicked')}
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 4'
|
|
|
|
onClick={() => console.log('Button 4 clicked')}
|
|
|
|
/>
|
|
|
|
<DropDownItem isSeparator />
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 5'
|
|
|
|
onClick={() => console.log('Button 5 clicked')}
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 6'
|
|
|
|
onClick={() => console.log('Button 6 clicked')}
|
|
|
|
/>
|
2019-06-10 12:28:54 +00:00
|
|
|
</DropDown>
|
|
|
|
</Col>
|
2019-06-24 13:18:47 +00:00
|
|
|
<Col xs="2"/>
|
2019-06-10 12:28:54 +00:00
|
|
|
<Col>
|
|
|
|
<GroupButton text='Dropdown demo' isDropdown={true}>
|
2019-06-24 13:18:47 +00:00
|
|
|
<DropDownItem
|
|
|
|
label='Button 1'
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 2'
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
label='Button 3'
|
2019-06-10 12:28:54 +00:00
|
|
|
/>
|
|
|
|
</GroupButton>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</Container>
|
|
|
|
)
|
|
|
|
);
|