UNPKG

@peculiar/fortify-webcomponents

Version:

Web-components for creating CSR or Certificate and viewing certificates list using Fortify

24 lines (21 loc) 1 kB
/*! * © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License */ import { h } from './index-4c0eccab.js'; import { T as Typography } from './typography-a2121a56.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 (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 && (h(Typography, { variant: "b3", color: "black", component: "span" }, children)))); }; export { Button as B }; //# sourceMappingURL=button-e984f3b1.js.map