@cimpress/react-components
Version:
React components to support the MCP styleguide
54 lines • 2.22 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_components_1 = require("@cimpress/react-components");
const tag_jsx_1 = __importDefault(require("!raw-loader!./tag.jsx"));
const tag_jsx_2 = __importDefault(require("./tag.jsx"));
const TabbedComponentDoc_1 = __importDefault(require("../../shared/TabbedComponentDoc"));
const TagDocs = () => {
const propInfos = [
{
name: 'removable',
type: 'boolean',
default: 'false',
description: "Determines whether to show an 'x' at the right hand side of the component to indicate the tag can be removed.",
},
{
name: 'onRemoveClick',
type: 'function',
default: '',
description: 'Function to be called when the x to remove the tag is clicked',
},
{
name: 'label',
type: 'node',
default: '',
description: 'Label to render within the tag. If not provided, value will be shown.',
},
{
name: 'value',
type: 'node',
default: '',
description: 'Value represented by the tag.',
},
{
name: 'size',
type: 'string',
description: (react_1.default.createElement("div", null,
"One of the following:",
react_1.default.createElement("ul", null,
react_1.default.createElement("li", null, "sm"),
react_1.default.createElement("li", null, "lg")),
"If not defined, will default to a medium size.")),
default: '',
},
];
return (react_1.default.createElement(TabbedComponentDoc_1.default, { name: "Tag", propInfos: propInfos },
react_1.default.createElement(tag_jsx_2.default, null),
react_1.default.createElement(react_components_1.CodeExample, { code: tag_jsx_1.default })));
};
exports.default = TagDocs;
//# sourceMappingURL=index.js.map