@cimpress/react-components
Version:
React components to support the MCP styleguide
78 lines • 2.98 kB
JavaScript
import React from 'react';
import { CodeExample } from '@cimpress/react-components';
import ButtonCode from '!raw-loader!./button.jsx';
import ButtonDemo from './button.jsx';
import IconButtonCode from '!raw-loader!./IconButton';
import IconButtonDemo from './IconButton';
import ComponentDoc from '../../shared/TabbedComponentDoc';
const ButtonDocs = () => {
const propInfos = [
{
name: 'href',
type: 'string',
description: 'The ability to make the button navigate to a url',
default: '#',
},
{
name: 'target',
type: 'string',
default: '',
description: 'Specify the behavior of button navigation',
},
{
name: 'variant',
type: 'string',
default: 'default',
description: (React.createElement("div", null,
"The variant of button you are creating, providing one of the following values:",
React.createElement("ul", null,
React.createElement("li", null, "default"),
React.createElement("li", null, "primary"),
React.createElement("li", null, "secondary"),
React.createElement("li", null, "link"),
React.createElement("li", null, "outline-secondary")))),
},
{
name: 'size',
type: 'string',
description: (React.createElement("div", null,
"The size of the button you are creating, providing one of the following values:",
React.createElement("ul", null,
React.createElement("li", null, "default"),
React.createElement("li", null, "sm"),
React.createElement("li", null, "lg")))),
default: 'default',
},
{
name: 'onClick',
type: 'function',
default: '',
description: 'The callback function used when a button is clicked',
},
{
name: 'disabled',
type: 'boolean',
default: 'false',
description: 'The ability to disable the button',
},
{
name: 'blockLevel',
type: 'boolean',
default: 'false',
description: 'The ability to make the button fill the content block',
},
{
name: 'children',
type: 'node',
default: '',
description: 'The inner contents of the button',
},
];
return (React.createElement(ComponentDoc, { name: "Button", propInfos: propInfos },
React.createElement(ButtonDemo, null),
React.createElement(CodeExample, { code: ButtonCode }),
React.createElement(IconButtonDemo, null),
React.createElement(CodeExample, { code: IconButtonCode })));
};
export default ButtonDocs;
//# sourceMappingURL=index.js.map