astro/packages/integrations/solid/static-html.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
331 B
JavaScript
Raw Normal View History

import { ssr } from 'solid-js/web';
/**
* Astro passes `children` as a string of HTML, so we need
* a wrapper `astro-fragment` to render that content as VNodes.
*/
const StaticHtml = ({ innerHTML }) => {
if (!innerHTML) return null;
return ssr(`<astro-fragment>${innerHTML}</astro-fragment>`);
};
export default StaticHtml;