UNPKG

@peculiar/fortify-webcomponents

Version:

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

34 lines (30 loc) 1.27 kB
/*! * © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License */ 'use strict'; var index = require('./index-C-N1xkRB.js'); var typography = require('./typography-BzZd2J3Y.js'); /*! * © Peculiar Ventures https://peculiarventures.com/ - MIT License */ /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 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', class: { button: true, // eslint-disable-next-line react/destructuring-assignment m_no_padding: children.length === 0, [classProp]: Boolean(classProp), }, onClick: onClick }, startIcon, children.length > 0 && (index.h(typography.Typography, { variant: "b3", color: "black", component: "span" }, children)))); }; exports.Button = Button; //# sourceMappingURL=button-CdL8Icyk.js.map //# sourceMappingURL=button-CdL8Icyk.js.map