UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

56 lines 2.83 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.notes = void 0; var react_1 = __importDefault(require("react")); var create_react_class_1 = __importDefault(require("create-react-class")); var index_1 = require("../../../index"); var style = { marginRight: '15px', }; var subSelection = { display: 'block', marginTop: '13px', }; exports.default = create_react_class_1.default({ getInitialState: function () { return { height: null, }; }, handleSelectedTallSimon: function () { this.setState({ height: 'Tall Simon', }); }, handleSelectedShortSimon: function () { this.setState({ height: 'Short Simon', }); }, render: function () { return (react_1.default.createElement(index_1.RadioGroup, null, react_1.default.createElement(index_1.RadioGroup.RadioButton, { style: style }, react_1.default.createElement(index_1.RadioGroup.Label, null, "Alvin")), react_1.default.createElement(index_1.RadioGroup.RadioButton, { style: style }, react_1.default.createElement(index_1.RadioGroup.Label, null, "Simon", react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.height === 'Tall Simon', onSelect: this.handleSelectedTallSimon }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Tall Simon")), react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.height === 'Short Simon', onSelect: this.handleSelectedShortSimon }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Short Simon")))), react_1.default.createElement(index_1.RadioGroup.RadioButton, { style: style }, react_1.default.createElement(index_1.RadioGroup.Label, null, "Theodore", react_1.default.createElement(index_1.SingleSelect, { style: subSelection }, react_1.default.createElement(index_1.SingleSelect.Option, null, "Tall Theo"), react_1.default.createElement(index_1.SingleSelect.Option, null, "Short Theo"), react_1.default.createElement(index_1.SingleSelect.Option, null, "Average height Theo")))))); }, }); // begin-hide-from-docs exports.notes = "\nYou can nest items in the `RadioGroup` for sub-selections. Please work with a designer to style and define states for sub-selections.\n"; // end-hide-from-docs //# sourceMappingURL=2.nested-select.js.map