UNPKG

@peculiar/fortify-webcomponents

Version:

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

25 lines (24 loc) 1.22 kB
/*! * © 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"; import { Typography } from "@peculiar/certificates-viewer"; import { CheckIcon } from "../icons"; export const FortifyCheckbox = (props) => { const { label, name, disabled, defaultChecked, required, readOnly, } = props; return (h("label", { class: "form_checkbox_root" }, h("div", { class: "form_checkbox_container" }, h("input", { type: "checkbox", name: name, disabled: disabled, defaultChecked: defaultChecked, required: required, tabIndex: readOnly ? -1 : undefined, readOnly: readOnly, class: "form_checkbox", onClick: (event) => { if (readOnly) { event.preventDefault(); return false; } return undefined; } }), h(CheckIcon, { "aria-hidden": "true", class: "form_checkbox_icon_check" })), h(Typography, { variant: "b3", color: "black", component: "span" }, label))); }; //# sourceMappingURL=fortify-checkbox.js.map