{this.props.children}
{this.props.type == 'custom' // custom modals define their own buttons
? null
:
{this.props.type == 'confirm'
?
: null}
}
);
}
});
export const ExpandableModal = React.createClass({
propTypes: {
expandButtonLabel: React.PropTypes.string,
extraContent: React.PropTypes.element,
},
getDefaultProps: function() {
return {
confirmButtonLabel: 'OK',
expandButtonLabel: 'Show More...',
hideButtonLabel: 'Show Less',
}
},
getInitialState: function() {
return {
expanded: false,
}
},
toggleExpanded: function() {
this.setState({
expanded: !this.state.expanded,
});
},
render: function() {
return (