@peculiar/fortify-webcomponents
Version:
Web-components for creating CSR or Certificate and viewing certificates list using Fortify
25 lines (24 loc) • 1.18 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";
import { Typography } from "@peculiar/certificates-viewer";
import { InputRequiredIcon } from "../icons";
export const FortifyInput = (props) => {
const { label, disabled, maxLength, name, placeholder, readOnly, required, defaultValue, } = props;
const renderIconRequired = () => {
if (!required) {
return null;
}
return (h(InputRequiredIcon, { class: "form_field_icon_required" }));
};
return (h("label", null, h(Typography, { variant: "c2", color: "gray-10", component: "span" }, label), h("div", { class: "form_field_container" }, h("input", { class: "form_field t-b3", type: "text", disabled: disabled, maxLength: maxLength, name: name, placeholder: placeholder, readOnly: readOnly, required: required, defaultValue: defaultValue }), renderIconRequired())));
};
//# sourceMappingURL=fortify-input.js.map