-
+
);
}
diff --git a/app/markdoc/nodes.ts b/app/markdoc/nodes.ts
index 72ba7a9..4eb69fb 100644
--- a/app/markdoc/nodes.ts
+++ b/app/markdoc/nodes.ts
@@ -36,6 +36,16 @@ const nodes = {
return new Tag(`h${node.attributes.level}`, { ...attributes, id }, children);
},
},
+ strong: {
+ ...defaultNodes.strong,
+ attributes: {
+ ...defaultNodes.strong.attributes,
+ class: {
+ type: String,
+ default: "font-semibold text-slate-800 dark:text-slate-200",
+ },
+ },
+ },
th: {
...defaultNodes.th,
attributes: {
diff --git a/app/providers/ThemeProvider.tsx b/app/providers/ThemeProvider.tsx
new file mode 100644
index 0000000..ccb59c7
--- /dev/null
+++ b/app/providers/ThemeProvider.tsx
@@ -0,0 +1,22 @@
+import { ThemeContext, type Theme } from "@/contexts/ThemeContext";
+import { useEffect, useState } from "react";
+
+type ThemeProviderProps = {
+ children: React.ReactNode;
+ defaultTheme?: Theme;
+};
+
+export function ThemeProvider(props: ThemeProviderProps) {
+ const [theme, setTheme] = useState
(props.defaultTheme || "light");
+
+ useEffect(() => {
+ const rootElement = document.documentElement;
+
+ rootElement.classList.toggle("dark", theme === "dark");
+ rootElement.classList.toggle("light", theme === "light");
+
+ console.log("changed theme to", theme);
+ }, [theme]);
+
+ return {props.children};
+}