UNPKG

@cimpress/react-components

Version:
59 lines 2.06 kB
import React from 'react'; import { CodeExample } from '@cimpress/react-components'; import AlertCode from '!raw-loader!./alert.jsx'; import AlertDemo from './alert.jsx'; import ComponentDoc from '../../shared/TabbedComponentDoc'; const AlertDocs = () => { const propInfos = [ { name: 'status', type: 'string', default: 'danger', description: (React.createElement("span", null, "One of ", React.createElement("code", null, "danger"), ", ", React.createElement("code", null, "warning"), ", ", React.createElement("code", null, "info"), ", or ", React.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.createElement(ComponentDoc, { name: "Alert", propInfos: propInfos }, React.createElement(AlertDemo, null), React.createElement(CodeExample, { code: AlertCode }))); }; export default AlertDocs; //# sourceMappingURL=index.js.map