UNPKG

@cimpress/react-components

Version:
64 lines 2.52 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 alert_jsx_1 = __importDefault(require("!raw-loader!./alert.jsx")); const alert_jsx_2 = __importDefault(require("./alert.jsx")); const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc")); const AlertDocs = () => { const propInfos = [ { name: 'status', type: 'string', default: 'danger', description: (react_1.default.createElement("span", null, "One of ", react_1.default.createElement("code", null, "danger"), ", ", react_1.default.createElement("code", null, "warning"), ", ", react_1.default.createElement("code", null, "info"), ", or ", react_1.default.createElement("code", null, "success"), ", defines the alert style.")), }, { name: 'dismissible', type: 'boolean', default: 'true', description: 'Controls whether or not the close button on the right is shown', }, { name: 'dismissed', type: 'boolean', default: 'false', description: 'Controls whether or not the alert is dismissed', }, { name: 'title', type: 'node', default: '', description: 'Title for the alert. If no title is provided, the alert will not render a title section.', }, { name: 'message', type: 'node (required)', default: '', description: 'Message for the alert.', }, { name: 'onDismiss', type: 'function', default: '', description: 'A function to be called when the alert is closed.', }, ]; return (react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Alert", propInfos: propInfos }, react_1.default.createElement(alert_jsx_2.default, null), react_1.default.createElement(react_components_1.CodeExample, { code: alert_jsx_1.default }))); }; exports.default = AlertDocs; //# sourceMappingURL=index.js.map