1 | import React from 'react'
|
2 |
|
3 | import { storiesOf } from '@storybook/react'
|
4 | import { action } from '@storybook/addon-actions'
|
5 |
|
6 | import PrintDialog from '../src/components/PrintDialog'
|
7 |
|
8 | class PrintDialogWrapper extends React.Component {
|
9 | constructor (props) {
|
10 | super(props)
|
11 | this.state = {
|
12 | paperSize: 'letter'
|
13 | }
|
14 | }
|
15 |
|
16 | render () {
|
17 | return <PrintDialog
|
18 | open
|
19 | onRequestClose={action('close')}
|
20 | paperSize={this.state.paperSize}
|
21 | onChangePaperSize={paperSize => this.setState({paperSize})} />
|
22 | }
|
23 | }
|
24 |
|
25 | storiesOf('PrintDialog', module)
|
26 | .add('Default', () => (
|
27 | <PrintDialogWrapper />
|
28 | ))
|
29 |
|
\ | No newline at end of file |