aboutsummaryrefslogtreecommitdiff
path: root/packages/renderers/renderer-solid/static-html.js
blob: 953416c4919cf00558a78980eb71ef27edfe2269 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { createComponent } from 'solid-js';

/**
 * 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 () => createComponent('astro-fragment', { innerHTML });
};

export default StaticHtml;