@sandlada/vue-mdc
Version:

56 lines (55 loc) • 1.73 kB
JavaScript
/**
* @license
* Copyright 2025 Sandlada & Kai Orion
* SPDX-License-Identifier: MIT
*/
import { defineComponent, ref, createVNode } from "vue";
import { useReflectAttribute } from "../../node_modules/@glare-labs/vue-reflect-attribute/build/vue-reflect-attribute.js";
import { componentNamePrefix } from "../../internals/component-name-prefix/component-name-prefix.js";
import { Elevation } from "../elevation/elevation.js";
import "../elevation/elevation.definition.js";
import { props } from "./banner.definition.js";
import css from "./styles/banner.module.scss.js";
const Banner = /* @__PURE__ */ defineComponent({
name: `${componentNamePrefix}-banner`,
props,
slots: {},
emits: [],
setup(props2, {
slots
}) {
const root = ref(null);
const _appearance = ref(props2.appearance);
const _line = ref(props2.line);
useReflectAttribute(root, {
attributes: [{
attribute: "appearance",
ref: _appearance,
reflect: true,
type: "string"
}, {
attribute: "line",
ref: _line,
reflect: true,
type: "string"
}]
});
return () => {
return createVNode("div", {
"data-component": "banner",
"ref": root,
"class": [css.banner, css.desktop, css[_line.value], css[_appearance.value]]
}, [createVNode("span", {
"class": css.icon
}, [slots.icon && slots.icon()]), createVNode("span", {
"class": css["supporting-text"]
}, [slots.default && slots.default()]), createVNode("span", {
"class": css.actions
}, [slots.actions && slots.actions()]), createVNode(Elevation, null, null)]);
};
}
});
export {
Banner
};
//# sourceMappingURL=banner.js.map