UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

28 lines 942 B
import _partial from "lodash/partial"; import React from 'react'; import createClass from 'create-react-class'; import { Button, Dialog } from '../../../index'; export default createClass({ getInitialState: function getInitialState() { return { isShown: false }; }, handleShow: function handleShow(isShown) { this.setState({ isShown: isShown }); }, render: function render() { return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, { onClick: _partial(this.handleShow, !this.state.isShown) }, "Toggle"), /*#__PURE__*/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" }, "This `Dialog` has no footer!")); } });