UNPKG

@seemusic/ui-components

Version:

A Vue 3 UI Library. Uses Composable.

48 lines (47 loc) 1.27 kB
import { defineComponent, computed, createVNode } from "vue"; const SopTheHeader = /* @__PURE__ */ defineComponent({ name: "SopTheHeader", props: { logo: { type: String, default: "" }, subTitle: { type: String, default: "" } }, emits: ["logo-click"], setup(props, { slots, emit }) { const isImg = computed(() => /\.(png|jpg|gif|jpeg|webp)$/.test(props.subTitle)); return () => { var _a; return createVNode("div", { "class": "sop-the-header" }, [createVNode("div", { "class": "the-header-left__content" }, [createVNode("div", { "class": "the-logo", "onClick": () => { emit("logo-click"); } }, [createVNode("img", { "src": props.logo, "height": "20" }, null)]), props.subTitle && createVNode("div", { "class": "the-sub-title" }, [isImg.value ? createVNode("img", { "src": props.subTitle }, null) : createVNode("h3", null, [props.subTitle])])]), createVNode("div", { "class": "the-header-right__content" }, [(_a = slots.rightOpt) == null ? void 0 : _a.call(slots)])]); }; } }); export { SopTheHeader as default }; //# sourceMappingURL=SopTheHeader.mjs.map