UNPKG

@cimpress/react-components

Version:
93 lines 3.63 kB
import React from 'react'; import { CodeExample } from '@cimpress/react-components'; import AccordionCode from '!raw-loader!./accordion'; import AccordionDemo from './accordion'; import AccordionCheckbox from './AccordionCheckbox'; import AccordionCheckboxCode from '!raw-loader!./AccordionCheckbox'; import AccordionVariants from './AccordionVariants'; import AccordionVariantCode from '!raw-loader!./AccordionVariants.tsx'; import ComponentDoc from '../../shared/TabbedComponentDoc'; const AccordionDocs = () => { const propInfos = [ { name: 'defaultOpen', type: 'boolean', default: 'false', description: 'Specify whether the accordion should be open or closed when it initially renders.', }, { name: 'customOpen', type: 'boolean', default: '', description: (React.createElement("div", null, "Can be used to customize when the accordion should be open.If this prop is used, ", React.createElement("code", null, "defaultOpen"), " will be ignored.")), }, { name: 'onClose', type: 'function', default: '', description: 'Function to be called when the accordion closes itself.', }, { name: 'onHeaderClick', type: 'function', default: '', description: (React.createElement("div", null, "Function to be called when the component is clicked. (Signature:", ' ', React.createElement("code", null, " onHeaderClick(event: DOMEvent, isNowOpen: boolean) "), ")")), }, { name: 'onHeaderClick', type: 'function', default: '', description: (React.createElement("div", null, "Function to be called when the component is clicked. (Signature:", ' ', React.createElement("code", null, " onHeaderClick(event: DOMEvent, isNowOpen: boolean) "), ")")), }, { name: 'style', type: 'object', default: '', description: 'Inline styles to be applied to the root accordion div.', }, { name: 'headerStyle', type: 'object', default: '', description: 'Inline styles to be applied to the accordion header div.', }, { name: 'bodyStyle', type: 'object', default: '', description: 'Inline styles to be applied to the accordion body div.', }, { name: 'className', type: 'string', default: '', description: 'Additional class names to be applied to the accordion.', }, { name: 'variant', type: 'default | ghost | minimal', default: 'default', description: 'Determines the visual variant of the accordion.', }, ]; return (React.createElement(ComponentDoc, { name: "Accordion", propInfos: propInfos }, React.createElement(AccordionDemo, null), React.createElement(CodeExample, { code: AccordionCode }), React.createElement(AccordionCheckbox, null), React.createElement(CodeExample, { code: AccordionCheckboxCode }), React.createElement(AccordionVariants, null), React.createElement(CodeExample, { code: AccordionVariantCode }))); }; export default AccordionDocs; //# sourceMappingURL=index.js.map