Html

tcmts.share.Html · #eyd5u67o · term · runs anywhere

HTML made on the server (rendered Markdown, highlighted code) in a page.

export function Html({ html, className, as }: { html: string; className?: string; as?: "div" | "pre" | "span" }) {
  const Tag = as ?? "div";
  return <Tag className={className} dangerouslySetInnerHTML={{ __html: html }} />;
}

used by