lucid-ui
Version:
A UI component library from AppNexus.
32 lines • 1.97 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_1 = __importDefault(require("lodash"));
var react_1 = __importDefault(require("react"));
var create_react_class_1 = __importDefault(require("create-react-class"));
var index_1 = require("../../../index");
exports.default = create_react_class_1.default({
getInitialState: function () {
return {
isShown: false,
};
},
handleShow: function (isShown) {
this.setState({ isShown: isShown });
},
render: function () {
return (react_1.default.createElement("div", null,
react_1.default.createElement(index_1.Button, { onClick: lodash_1.default.partial(this.handleShow, !this.state.isShown) }, "Toggle"),
react_1.default.createElement(index_1.Dialog, { isShown: this.state.isShown, handleClose: lodash_1.default.partial(this.handleShow, !this.state.isShown), Header: 'Header', size: 'medium' },
react_1.default.createElement("div", { key: 'info' }, "For better UX, we recommend NOT handling onEscape and onBackgroundClick when isModal is true. The term \"modal\" implies that the user needs to interact with one of the buttons in the footer to exit the dialog."),
lodash_1.default.times(50).map(function (i) {
return react_1.default.createElement("div", { key: i }, "Body");
}),
react_1.default.createElement(index_1.Dialog.Footer, null,
react_1.default.createElement(index_1.Button, { kind: 'invisible', onClick: lodash_1.default.partial(this.handleShow, false), style: { marginRight: '9px' } }, "Cancel"),
react_1.default.createElement(index_1.Button, { kind: 'primary' }, "Save")))));
},
});
//# sourceMappingURL=2.medium.js.map