@cimpress/react-components
Version:
React components to support the MCP styleguide
56 lines • 2.49 kB
JavaScript
import React from 'react';
import { CodeExample } from '@cimpress/react-components';
import SelectWrapperCode from '!raw-loader!./selectwrapper.jsx';
import SelectWrapperDemo from './selectwrapper.jsx';
import ComponentDoc from '../../shared/TabbedComponentDoc';
const SelectWrapperDocs = () => {
const propInfos = [
{
name: 'containerClassName',
type: 'string',
default: '',
description: 'A class name to append to the div that wraps the select component.',
},
{
name: 'selectedSelect',
type: 'function',
default: '',
description: 'The Select you wish to use to render the component.',
},
{
name: 'helpText',
type: 'node',
default: '',
description: 'Additional help text to display under the select field.',
},
{
name: 'status',
type: 'string',
default: '',
description: (React.createElement("div", null,
"One of ",
React.createElement("code", null, "success"),
", ",
React.createElement("code", null, "warning"),
", or ",
React.createElement("code", null, "error"),
", provides a validation state.")),
},
];
const remarks = (React.createElement("div", null,
React.createElement("p", null,
"Currently,",
' ',
React.createElement("a", { href: "https://github.com/bvaughn/react-virtualized-select", target: "_blank", rel: "noopener noreferrer" }, "react-virtualized-select"),
' ',
"and",
' ',
React.createElement("a", { href: "https://github.com/HubSpot/react-select-plus", target: "_blank", rel: "noopener noreferrer" }, "react-select-plus"),
' ',
"are also supported by the stylesheet. If using react-select v. 2.x.x and above as the selectedSelect, you will need to import the custom styles from @cimpress/react-components/lib/Select/styles and pass them to the SelectWrapper.")));
return (React.createElement(ComponentDoc, { name: "SelectWrapper", propInfos: propInfos, remarks: remarks },
React.createElement(SelectWrapperDemo, null),
React.createElement(CodeExample, { code: SelectWrapperCode })));
};
export default SelectWrapperDocs;
//# sourceMappingURL=index.js.map