UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

62 lines 3.13 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var react_1 = __importDefault(require("react")); var create_react_class_1 = __importDefault(require("create-react-class")); var index_1 = require("../../../index"); var style = { marginBottom: '3px', }; exports.default = create_react_class_1.default({ getInitialState: function () { return { flavor: 'vanilla', }; }, handleSelectedChocolate: function () { this.setState({ flavor: 'chocolate', }); }, handleSelectedCaramel: function () { this.setState({ flavor: 'saltedCaramel', }); }, handleSelectedMint: function () { this.setState({ flavor: 'mintChip', }); }, handleSelectedStrawberry: function () { this.setState({ flavor: 'strawberry', }); }, handleSelectedVanilla: function () { this.setState({ flavor: 'vanilla', }); }, render: function () { return (react_1.default.createElement("section", null, react_1.default.createElement("span", { style: { display: 'inline-flex', flexDirection: 'column', alignItems: 'flex-start', } }, react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.flavor === 'vanilla', name: 'interactive-radio-buttons', onSelect: this.handleSelectedVanilla, style: style }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Vanilla")), react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.flavor === 'chocolate', name: 'interactive-radio-buttons', onSelect: this.handleSelectedChocolate, style: style }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Chocolate")), react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.flavor === 'strawberry', name: 'interactive-radio-buttons', onSelect: this.handleSelectedStrawberry, style: style }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Strawberry")), react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.flavor === 'saltedCaramel', name: 'interactive-radio-buttons', onSelect: this.handleSelectedCaramel, style: style }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Salted caramel")), react_1.default.createElement(index_1.RadioButtonLabeled, { isSelected: this.state.flavor === 'mintChip', name: 'interactive-radio-buttons', onSelect: this.handleSelectedMint, style: style }, react_1.default.createElement(index_1.RadioButtonLabeled.Label, null, "Mint choc chip (the best)"))))); }, }); //# sourceMappingURL=0.interactive.js.map