Create documentation for Ico and IcoContainer components

This commit is contained in:
cyril lopez 2017-10-17 16:11:30 +02:00
parent 8f35c9186c
commit 3504624c84

View File

@ -104,8 +104,12 @@ class FooPage extends React.Component {
render () { render () {
return ( return (
<div className={styles.fooPage}> <div className={styles.fooPage}>
<Ico icoType="trash" onClick={this.handleClick} /> <Ico icoType="trash" onClick={this.handleClick} />
<PopUpWarning isOpen={this.state.showModal} onConfirm={() => this.setState({ showModal: false })} toggleModal={() => this.setState({ showModal: false })} /> <PopUpWarning
isOpen={this.state.showModal}
onConfirm={() => this.setState({ showModal: false })}
toggleModal={() => this.setState({ showModal: false })}
/>
</div> </div>
); );
} }
@ -146,11 +150,15 @@ class FooPage extends React.Component {
{ icoType: 'pencil', onClick: () => console.log('click on pencil icon') }, { icoType: 'pencil', onClick: () => console.log('click on pencil icon') },
{ icoType: 'trash', onClick: this.handleClick }, { icoType: 'trash', onClick: this.handleClick },
]; ];
return ( return (
<div className={styles.fooPage}> <div className={styles.fooPage}>
<IcoContainer icons={icons} /> <IcoContainer icons={icons} />
<PopUpWarning isOpen={this.state.showModal} onConfirm={() => this.setState({ showModal: false })} toggleModal={() => this.setState({ showModal: false })} /> <PopUpWarning
isOpen={this.state.showModal}
onConfirm={() => this.setState({ showModal: false })}
toggleModal={() => this.setState({ showModal: false })}
/>
</div> </div>
); );
} }