lucid-ui
Version:
A UI component library from AppNexus.
20 lines (19 loc) • 842 B
JavaScript
import _ from 'lodash';
import React from 'react';
import createClass from 'create-react-class';
import { Button, Dialog } from '../../../index';
export default createClass({
getInitialState() {
return {
isShown: false,
};
},
handleShow(isShown) {
this.setState({ isShown });
},
render() {
return (React.createElement("div", null,
React.createElement(Button, { onClick: _.partial(this.handleShow, !this.state.isShown) }, "Toggle"),
React.createElement(Dialog, { isShown: this.state.isShown, handleClose: _.partial(this.handleShow, !this.state.isShown), onBackgroundClick: _.partial(this.handleShow, false), onEscape: _.partial(this.handleShow, false), Header: 'Header', size: 'medium', hasGutters: false }, "This `Dialog` has no gutters!")));
},
});