UwU add hint styling implementation with jsx markdown transform

This commit is contained in:
James Fenn
2023-06-24 17:18:59 -04:00
parent 6d5106f0c0
commit 393dfa6282
7 changed files with 188 additions and 18 deletions

View File

@@ -0,0 +1,22 @@
/** @jsxRuntime automatic */
import { Node, Element } from "hast";
interface HintProps {
title: string;
children: Node[];
};
/** @jsxImportSource hastscript */
export function Hint({ title, children }: HintProps): Element {
return (
<details class="hint">
<summary class="hint__title text-style-body-medium-bold">
{title}
</summary>
<div class="hint__content">
{children}
</div>
</details>
) as never;
}