@cimpress/react-components
Version:
React components to support the MCP styleguide
92 lines • 3.34 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ModalDocs;
const react_1 = __importDefault(require("react"));
const react_components_1 = require("@cimpress/react-components");
const modal_jsx_1 = __importDefault(require("!raw-loader!./modal.jsx"));
const modal_jsx_2 = __importDefault(require("./modal.jsx"));
const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc"));
function ModalDocs() {
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_1.default.createElement(TabbedComponentDoc_1.default, { name: "Modal", propInfos: propInfos },
react_1.default.createElement(modal_jsx_2.default, null),
react_1.default.createElement(react_components_1.CodeExample, { code: modal_jsx_1.default })));
}
//# sourceMappingURL=index.js.map