UNPKG

@cimpress/react-components

Version:
87 lines 2.98 kB
import React, { useState } from 'react'; import { CodeExample } from '@cimpress/react-components'; import ModalCode from '!raw-loader!./modal.jsx'; import ModalDemo from './modal.jsx'; import ComponentDoc from '../../shared/TabbedComponentDoc'; export default function ModalDocs() { const [perfTest, setPerfTest] = useState(false); const propInfos = [ { name: 'show', type: 'boolean (required)', default: '', description: 'Controls whether or not the modal is displayed', }, { name: 'title', type: 'node', default: '', description: 'Title for the modal. If no title is provided, the space will be left blank.', }, { name: 'closeButton', type: 'boolean', default: 'false', description: 'Controls whether an "x" appears in the header to close the modal.', }, { name: 'footer', type: 'node', default: '', description: 'Modal footer. Any buttons with actions should go here. If a footer is not provided, the modal-footer element will not render.', }, { name: 'onRequestHide', type: 'function', default: '', description: 'Function called when the modal wants to close itself.', }, { name: 'closeOnOutsideClick', type: 'boolean', default: 'true', description: 'Calls onRequestHide when clicked outside of the main Modal div.', }, { name: 'size', type: 'string', default: '', description: 'Render the modal with a specific size, one of "sm" or "lg"', }, { name: 'status', type: 'string', default: '', description: `Render the modal with a bootstrap contextual style, one of one of "success" "warning" "danger" or "info"`, }, { name: 'className', type: 'string', default: '', description: 'Class name to append to the body of the modal', }, { name: 'style', type: 'object', default: '', description: 'Inline styles for the body of the modal', }, { name: 'wrapperStyle', type: 'object', default: '', description: 'Inline styles for the modal wrapper node', }, { name: 'children', type: 'node', default: '', description: 'JSX to render as the body of the modal', }, ]; return (React.createElement(ComponentDoc, { name: "Modal", propInfos: propInfos }, React.createElement(ModalDemo, null), React.createElement(CodeExample, { code: ModalCode }))); } //# sourceMappingURL=index.js.map