UNPKG

@cimpress/react-components

Version:
74 lines 3.14 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 datePicker_jsx_1 = __importDefault(require("!raw-loader!./datePicker.jsx")); const datePicker_jsx_2 = __importDefault(require("./datePicker.jsx")); const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc")); const DatePickerDocs = () => { const propInfos = [ { name: 'readonly', type: 'boolean', default: 'false', description: (react_1.default.createElement("div", null, "Indicates whether a selected date time is readonly and can only be set by selecting a date on the calendar.")), }, { name: 'label', type: 'string', default: '', description: (react_1.default.createElement("div", null, "Floating label for an input field. Use either this or ", react_1.default.createElement("code", null, "placeholder"), " but not both")), }, { name: 'helpText', type: 'node', default: '', description: 'Additional help text to display under the input field.', }, { name: 'placeholder', type: 'string', default: '', description: 'The placeholder that will displayed inside the input box.', }, { name: 'disabled', type: 'boolean', default: 'false', description: 'Indicates whether the input box should be disabled.', }, { name: 'required', type: 'boolean', default: 'false', description: 'Indicates whether a selected date time is required.', }, { name: 'isClearable', type: 'boolean', default: 'false', description: 'Indicates whether a selected date can be cleared.', }, { name: 'onClickInput', type: 'function', default: '', description: 'Callback trigger for when the user clicks the input box.', }, ]; return (react_1.default.createElement("div", null, react_1.default.createElement("div", null, "This component depends on react-datetime which has a peer dependency on moment. To import and use this component moment must be installed.", react_1.default.createElement("pre", null, "npm install moment")), react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Date Picker", propInfos: propInfos }, react_1.default.createElement(datePicker_jsx_2.default, null), react_1.default.createElement(react_components_1.CodeExample, { code: datePicker_jsx_1.default })))); }; exports.default = DatePickerDocs; //# sourceMappingURL=index.js.map