Skip to content

Commit

Permalink
feat: add <WindowWidthSensor> stories
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed May 11, 2018
1 parent e3e4ad2 commit 22a26f9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/WindowWidthSensor/__story__/story.js
@@ -0,0 +1,18 @@
import {createElement as h} from 'react';
import {storiesOf} from '@storybook/react';
import {action} from '@storybook/addon-actions';
import {WindowWidthSensor} from '..';
import ShowDocs from '../../../.storybook/ShowDocs'

storiesOf('Sensors/WindowWidthSensor', module)
// .add('Documentation', () => h(ShowDocs, {md: require('../../../docs/en/WindowWidthSensor.md')}))
.add('Example', () =>
h(WindowWidthSensor, {onChange: action('onChange')}, ({width, height}) =>
h('div', {},
`WIDTH: ${width}, HEIGHT: ${height}`
)
)
)
.add('No children', () =>
h(WindowWidthSensor, {onChange: action('onChange')})
)

0 comments on commit 22a26f9

Please sign in to comment.