2019-06-21 16:02:16 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { storiesOf } from '@storybook/react';
|
2019-07-09 10:30:58 +00:00
|
|
|
import { Link, DropDownItem } from 'asc-web-components';
|
2019-06-24 14:57:26 +00:00
|
|
|
import { Container, Row, Col } from 'reactstrap';
|
2019-06-21 16:02:16 +00:00
|
|
|
|
|
|
|
const rowStyle = {
|
|
|
|
marginTop: 8,
|
|
|
|
paddingLeft: 20,
|
|
|
|
fontSize: 12
|
|
|
|
};
|
|
|
|
|
2019-06-24 14:57:26 +00:00
|
|
|
const headerStyle = {
|
|
|
|
marginTop: 8,
|
|
|
|
paddingLeft: 20,
|
|
|
|
fontSize: 16,
|
|
|
|
};
|
|
|
|
|
2019-06-21 16:02:16 +00:00
|
|
|
storiesOf('Components|Link', module)
|
2019-06-24 08:30:20 +00:00
|
|
|
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
|
|
|
.addParameters({ options: { showAddonPanel: false } })
|
2019-06-21 16:02:16 +00:00
|
|
|
.add('all', () => (
|
2019-06-24 08:30:20 +00:00
|
|
|
<>
|
2019-06-21 16:02:16 +00:00
|
|
|
<Container fluid>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Row style={headerStyle}>
|
|
|
|
<Col>Page links:</Col>
|
|
|
|
<Col>Action links:</Col>
|
|
|
|
<Col>Another using of action links:</Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "black" href="https://github.com" isBold = {true} text = 'Bold black page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "black" isBold = {true} text = 'Bold black action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
2019-07-09 10:30:58 +00:00
|
|
|
<Col>
|
|
|
|
<Link type = "action" color = "black" dropdownType = 'alwaysDotted' text = 'Simple dropdown'>
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key1'
|
|
|
|
onClick={() => console.log('Base button clicked')}
|
|
|
|
label='Base button'
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key2'
|
|
|
|
onClick={() => console.log('Base button2 clicked')}
|
|
|
|
label='Base button2'
|
|
|
|
/>
|
|
|
|
</Link>
|
|
|
|
</Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "black" href="https://github.com" text = 'Black page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "black" text = 'Black action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
2019-07-09 10:30:58 +00:00
|
|
|
<Col>
|
|
|
|
<Link type = "action" color = "gray" dropdownType = 'appearDottedAfterHover' text = 'Gray dropdown and dotted appear after hover'>
|
|
|
|
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key1'
|
|
|
|
onClick={() => console.log('Base button clicked')}
|
|
|
|
label='Base button'
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key2'
|
|
|
|
onClick={() => console.log('Base button2 clicked')}
|
|
|
|
label='Base button2'
|
|
|
|
/>
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key3'
|
|
|
|
isSeparator = {true}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key4'
|
|
|
|
onClick={() => console.log('Base button3 clicked')}
|
|
|
|
label='Base button3'
|
|
|
|
/>
|
|
|
|
|
|
|
|
<DropDownItem
|
|
|
|
key= 'key5'
|
|
|
|
onClick={() => console.log('Base button4 clicked')}
|
|
|
|
label='Base button4'
|
|
|
|
/>
|
|
|
|
</Link>
|
|
|
|
</Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "black" href="https://github.com" isHovered = {true} text = 'Black hovered page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "black" isHovered = {true} text = 'Black hovered action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
2019-06-25 14:14:55 +00:00
|
|
|
<Col></Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "gray" href="https://github.com" text = 'Gray page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "gray" text = 'Gray action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
2019-06-25 14:14:55 +00:00
|
|
|
<Col></Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "gray" href="https://github.com" isHovered = {true} text = 'Gray hovered page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "gray" isHovered = {true} text = 'Gray hovered action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
2019-06-25 14:14:55 +00:00
|
|
|
<Col></Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "blue" href="https://github.com" text = 'Blue page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "blue" text = 'Blue action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col></Col>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
2019-06-24 14:57:26 +00:00
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "page" color = "blue" href="https://github.com" isHovered = {true} text = 'Blue hovered page link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col>
|
2019-06-28 08:37:13 +00:00
|
|
|
<Link type = "action" color = "blue" isHovered = {true} text = 'Blue hovered action link' />
|
2019-06-24 14:57:26 +00:00
|
|
|
</Col>
|
|
|
|
<Col></Col>
|
2019-07-05 12:36:54 +00:00
|
|
|
</Row>
|
|
|
|
<Row style={rowStyle}>
|
|
|
|
<Col>
|
|
|
|
<Link type = "page" color = "black" href="https://github.com" isSemitransparent = {true} text = 'Semitransparent black page link' />
|
|
|
|
</Col>
|
|
|
|
<Col>
|
|
|
|
<Link type = "action" color = "black" isSemitransparent = {true} text = 'Semitransparent black action link' />
|
|
|
|
</Col>
|
|
|
|
<Col></Col>
|
2019-06-25 14:14:55 +00:00
|
|
|
</Row>
|
2019-06-21 16:02:16 +00:00
|
|
|
</Container>
|
2019-06-24 08:30:20 +00:00
|
|
|
</>
|
|
|
|
));
|