@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 719 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
;const clsx=require("./clsx-dd4d6dd1.js"),index=require("./index-399c8b52.js"),Alert=require("./Alert-75d85d8a.js");function transformObjectProperties(r){return Object.entries(r).reduce(((r,[e,s])=>{const t=e.startsWith("_")?e.slice(1):e;return Object.assign(Object.assign({},r),{[t]:s})}),{})}const FormFieldMsgFc=({_alert:r,_msg:e,_hideError:s,_id:t})=>{const i=transformObjectProperties(e||{});return index.h(Alert.KolAlertFc,Object.assign({id:`${t}-error`,alert:r,type:"error",class:clsx.clsx({error:!0,"visually-hidden":!0===s})},i),(null==e?void 0:e._description)||void 0)},KolFormFieldMsgFc=FormFieldMsgFc;exports.KolFormFieldMsgFc=KolFormFieldMsgFc;