{this.props.children}
{this.props.type == "custom" // custom modals define their own buttons
? null
:
{this.props.type == "confirm"
?
: null}
}
);
}
}
export class ExpandableModal extends React.PureComponent {
static propTypes = {
expandButtonLabel: React.PropTypes.string,
extraContent: React.PropTypes.element,
};
static defaultProps = {
confirmButtonLabel: app.i18n.__("OK"),
expandButtonLabel: app.i18n.__("Show More..."),
hideButtonLabel: app.i18n.__("Show Less"),
};
constructor(props) {
super(props);
this.state = {
expanded: false,
};
}
toggleExpanded() {
this.setState({
expanded: !this.state.expanded,
});
}
render() {
return (