lumen-foundation-apps
Version:
'React port of foundation-apps'
21 lines (19 loc) • 476 B
JSX
var React = require('react');
var ActionSheetButton = React.createClass({
toggle: function () {
this.props.setActiveState(!this.props.active);
},
render: function () {
var Title = null;
if (this.props.title.length > 0) {
Title = <a className='button'>{this.props.title}</a>;
}
return (
<div onClick={this.toggle}>
{ Title }
<div>{this.props.children}</div>
</div>
);
}
});
module.exports = ActionSheetButton;