-
+ {props.withLineNumbers && props.children?.toString() && (
+
+ )}
+
+
- {props.children}
-
-
+
+ {props.children}
+
+
+
);
};
diff --git a/app/components/Prose.tsx b/app/components/Prose.tsx
index 5444381..c0b0218 100644
--- a/app/components/Prose.tsx
+++ b/app/components/Prose.tsx
@@ -25,8 +25,6 @@ export function Prose(props: ProseProps) {
"prose-a:font-semibold",
// link underline
"prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,var(--color-violet-300))] prose-a:hover:[--tw-prose-underline-size:6px]",
- // pre
- "prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg",
)}
{...props}
/>
diff --git a/app/components/Snippet.tsx b/app/components/Snippet.tsx
new file mode 100644
index 0000000..238ca02
--- /dev/null
+++ b/app/components/Snippet.tsx
@@ -0,0 +1,93 @@
+import type { JSX, Accessor, Setter } from "solid-js";
+
+import { For, createSignal } from "solid-js";
+import { Highlight } from "./Highlight";
+import clsx from "clsx";
+
+function TrafficLightsIcon(props: JSX.IntrinsicElements["svg"]) {
+ return (
+
+ );
+}
+
+type SnippetTab = {
+ name: string;
+ codeLanguage: string;
+ code: string;
+};
+
+type SnippetProps = {
+ children?: JSX.Element;
+ class?: string;
+ snippets: SnippetTab[];
+};
+
+export function Snippet(props: SnippetProps) {
+ const [selectedTab, setSelectedTab] = createSignal