@peculiar/fortify-webcomponents
Version:
Web-components for creating CSR or Certificate and viewing certificates list using Fortify
26 lines (22 loc) • 1.04 kB
JavaScript
/*!
* © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License
*/
;
const index = require('./index-39af7d9f.js');
const typography = require('./typography-526424d5.js');
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
const Button = (props, children) => {
const { href, class: classProp, startIcon, onClick, } = props;
const isLink = !!href;
const TagType = isLink ? 'a' : 'button';
return (index.h(TagType, { type: !isLink && 'button', href: isLink && href, target: isLink && '_blank', rel: isLink && 'noreferrer noopener', onClick: onClick, class: {
button: true,
// eslint-disable-next-line react/destructuring-assignment
m_no_padding: children.length === 0,
[classProp]: Boolean(classProp),
} }, startIcon, children.length > 0 && (index.h(typography.Typography, { variant: "b3", color: "black", component: "span" }, children))));
};
exports.Button = Button;
//# sourceMappingURL=button-528dbba8.js.map