mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
13 lines
331 B
JavaScript
13 lines
331 B
JavaScript
|
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;
|