vue-form-kit
Version:
  
45 lines (44 loc) • 1.29 kB
JavaScript
import { ref as s, watch as c, openBlock as r, createElementBlock as l, normalizeClass as f, createElementVNode as i, withModifiers as u, createBlock as m, resolveDynamicComponent as d, createCommentVNode as a } from "vue";
import { _ as v } from "./_plugin-vue_export-helper.9d74fd37.js";
const _ = {
name: "BlockFlash",
props: {
content: {
type: String,
default: null
},
type: {
type: String,
default: "success"
},
required: {
type: [String, Boolean],
default: !1
}
},
setup(n) {
const e = s(n.content);
return c(() => n.content, (t) => e.value = t), {
value: e
};
}
}, h = ["innerHTML"];
function p(n, e, t, o, y, k) {
return o.value ? (r(), l("div", {
key: 0,
class: f(["form-flash", [`form-flash--${t.type}`, t.required === !1 ? "" : "form-flash--required"]])
}, [
i("div", { innerHTML: o.value }, null, 8, h),
t.required === !1 ? (r(), l("a", {
key: 0,
class: "form-flash__close",
onClick: e[0] || (e[0] = u((C) => o.value = null, ["prevent"]))
}, [
(r(), m(d(`${n.$formKitConfigs.componentPrefix}IconClose`), { class: "w-4 h-4" }))
])) : a("", !0)
], 2)) : a("", !0);
}
const q = /* @__PURE__ */ v(_, [["render", p]]);
export {
q as default
};