Skip to content

Commit 1cc20b2

Browse files
committed
Add story
1 parent 77fe0d1 commit 1cc20b2

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

stories/index.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
import React from 'react';
1+
import React from 'react'
22

3-
import { storiesOf } from '@storybook/react';
4-
import { action } from '@storybook/addon-actions';
5-
import { linkTo } from '@storybook/addon-links';
3+
import { storiesOf } from '@storybook/react'
4+
import { action } from '@storybook/addon-actions'
5+
import { linkTo } from '@storybook/addon-links'
66

7-
import { Button, Welcome } from '@storybook/react/demo';
7+
import styled from 'styled-components'
88

9-
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
9+
import Img from '../lib'
1010

11-
storiesOf('Button', module)
12-
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
13-
.add('with some emoji', () => <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>);
11+
const Wrapper = styled.div`
12+
width: 400px;
13+
height: 400px;
14+
`
15+
16+
storiesOf('Img', module)
17+
.addDecorator(getStory => (
18+
<Wrapper>{getStory()}</Wrapper>
19+
))
20+
.add('initial', () => <Img src="http://lorempixel.com/400/400/animals" />)

0 commit comments

Comments
 (0)