Files
med-notes/.pnpm-store/v10/files/b5/c149882b4bdcd451e67f449008f1a14cfb13c75fb4ab47347213b55badb1086e9e3e61a810ade761c914f1675d76875a0ae7b29bd02a23c5f6754dfda87c70
2025-05-09 05:30:08 +02:00

42 lines
1.1 KiB
Plaintext

import { jsx } from "react/jsx-runtime";
function Asset({ tag, attrs, children }) {
switch (tag) {
case "title":
return /* @__PURE__ */ jsx("title", { ...attrs, suppressHydrationWarning: true, children });
case "meta":
return /* @__PURE__ */ jsx("meta", { ...attrs, suppressHydrationWarning: true });
case "link":
return /* @__PURE__ */ jsx("link", { ...attrs, suppressHydrationWarning: true });
case "style":
return /* @__PURE__ */ jsx(
"style",
{
...attrs,
dangerouslySetInnerHTML: { __html: children }
}
);
case "script":
if (attrs && attrs.src) {
return /* @__PURE__ */ jsx("script", { ...attrs, suppressHydrationWarning: true });
}
if (typeof children === "string")
return /* @__PURE__ */ jsx(
"script",
{
...attrs,
dangerouslySetInnerHTML: {
__html: children
},
suppressHydrationWarning: true
}
);
return null;
default:
return null;
}
}
export {
Asset
};
//# sourceMappingURL=Asset.js.map