mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 04:22:06 +00:00
embed svgs from build script to support dark mode
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
/** @jsxRuntime automatic */
|
||||
import { Node, Element } from "hast";
|
||||
import { fromHtml } from "hast-util-from-html";
|
||||
import { promises as fs } from "fs";
|
||||
|
||||
const chevron_down = await fs.readFile("src/icons/chevron_down.svg", "utf8");
|
||||
|
||||
interface HintProps {
|
||||
title: string;
|
||||
@@ -11,6 +15,7 @@ export function Hint({ title, children }: HintProps): Element {
|
||||
return (
|
||||
<details class="hint">
|
||||
<summary class="hint__title text-style-body-medium-bold">
|
||||
{fromHtml(chevron_down)}
|
||||
{title}
|
||||
</summary>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user