mirror of
https://github.com/ascribe/onion.git
synced 2024-06-30 21:52:08 +02:00
22 lines
654 B
JavaScript
22 lines
654 B
JavaScript
|
import React from 'react';
|
||
|
|
||
|
let AccordionListItemTableToggle = React.createClass({
|
||
|
propTypes: {
|
||
|
className: React.PropTypes.string,
|
||
|
onClick: React.PropTypes.func,
|
||
|
show: React.PropTypes.bool,
|
||
|
numOfTableItems: React.PropTypes.number
|
||
|
},
|
||
|
|
||
|
render() {
|
||
|
return (
|
||
|
<span
|
||
|
className={this.props.className}
|
||
|
onClick={this.props.onClick}>
|
||
|
{this.props.show ? 'Hide all ' + this.props.numOfTableItems + ' Editions' : 'Show all ' + this.props.numOfTableItems + ' Editions'}
|
||
|
</span>
|
||
|
);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default AccordionListItemTableToggle;
|