UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

18 lines (17 loc) 1.07 kB
/*! * KoliBri - The accessible HTML-Standard */ import { __rest } from "tslib"; import { h } from "@stencil/core"; import clsx from "../../utils/clsx"; import { createRelatedUniqueId } from "../../utils/dev.utils"; import { normalizeMsg } from "../../schema"; import KolAlertFc from "../Alert"; const FormFieldMsgFc = (_a) => { var _b, _c; var { alert, msg, id, class: classNames } = _a, other = __rest(_a, ["alert", "msg", "id", "class"]); const message = normalizeMsg(msg); return (h(KolAlertFc, Object.assign({ id: createRelatedUniqueId(id, 'msg'), alert: (_b = message === null || message === void 0 ? void 0 : message._alert) !== null && _b !== void 0 ? _b : alert, hasCloser: false, level: 0, type: (_c = message === null || message === void 0 ? void 0 : message._type) !== null && _c !== void 0 ? _c : 'error', variant: "msg", class: clsx('kol-form-field__msg', classNames) }, other), (message === null || message === void 0 ? void 0 : message._description) || undefined)); }; export default FormFieldMsgFc; //# sourceMappingURL=FormFieldMsg.js.map