@astrojs/vue
Version:
Use Vue components within Astro
21 lines (20 loc) • 477 B
JavaScript
import { defineComponent, h } from "vue";
const StaticHtml = defineComponent({
props: {
value: String,
name: String,
hydrate: {
type: Boolean,
default: true
}
},
setup({ name, value, hydrate }) {
if (!value) return () => null;
let tagName = hydrate ? "astro-slot" : "astro-static-slot";
return () => h(tagName, { name, innerHTML: value });
}
});
var static_html_default = StaticHtml;
export {
static_html_default as default
};