UNPKG

@cimpress/react-components

Version:
55 lines 2.23 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importDefault(require("react")); const react_components_1 = require("@cimpress/react-components"); const toggle_jsx_1 = __importDefault(require("!raw-loader!./toggle.jsx")); const toggle_jsx_2 = __importDefault(require("./toggle.jsx")); const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc")); const ToggleDocs = () => { const toggleProps = [ { name: 'on', type: 'boolean', default: '', description: "Controls whether or not the switch is in the 'on' position", }, { name: 'onClick', type: 'function', default: '', description: 'Function to trigger when the toggle is clicked.', }, { name: 'onText', type: 'string', default: 'On', description: "Text to display for the 'on' position of the switch. For best results, limit to 3 or fewer characters.", }, { name: 'offText', type: 'string', default: 'Off', description: "Text to display for the 'off' position of the switch. For best results, limit to 3 or fewer characters.", }, { name: 'size', type: 'string', default: '', description: "Determines the size of the switch. Defaults to the larger size, pass 'sm' for a smaller toggle.", }, { name: 'disabled', type: 'boolean', default: 'false', description: 'Disables the switch. onClick function will not fire.', }, ]; return (react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Toggle", propInfos: toggleProps }, react_1.default.createElement(toggle_jsx_2.default, null), react_1.default.createElement(react_components_1.CodeExample, { code: toggle_jsx_1.default }))); }; exports.default = ToggleDocs; //# sourceMappingURL=index.js.map