UNPKG

622 BJavaScriptView Raw
1import React from 'react'
2
3import { storiesOf } from '@storybook/react'
4import { action } from '@storybook/addon-actions'
5
6import PrintDialog from '../src/components/PrintDialog'
7
8class 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
25storiesOf('PrintDialog', module)
26 .add('Default', () => (
27 <PrintDialogWrapper />
28 ))
29
\No newline at end of file