@peculiar/fortify-webcomponents
Version:
Web-components for creating CSR or Certificate and viewing certificates list using Fortify
26 lines (25 loc) • 1.02 kB
JavaScript
/*!
* © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the BSD 3-Clause license found in the
* LICENSE file in the root directory of this source tree.
*/
import { h } from "@stencil/core";
export const FortifyButtonText = (props, children) => {
const { href, class: classProp, variant = 'secondary', 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_text: true,
't-b3': true,
'c-gray-9': variant === 'default',
'c-secondary': variant === 'secondary',
[`button_text_${variant}`]: true,
[classProp]: Boolean(classProp),
} }, children));
};
//# sourceMappingURL=fortify-button-text.js.map