21 lines
477 B
JavaScript
21 lines
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
|
|
};
|