{!hidePoweredBy && (
diff --git a/packages/robindoc/src/components/elements/robin-provider/index.tsx b/packages/robindoc/src/components/elements/robin-provider/index.tsx
index b87b5324..f018302a 100644
--- a/packages/robindoc/src/components/elements/robin-provider/index.tsx
+++ b/packages/robindoc/src/components/elements/robin-provider/index.tsx
@@ -1,44 +1,18 @@
import React from "react";
+import { type Theme } from "@src/core/types/theme";
import { NavigateProvider } from "@src/components/contexts/navigate/provider";
+import { ThemeStyles } from "@src/components/blocks/theme-styles";
+import { ThemeDetector } from "@src/components/blocks/theme-detector";
-const clientLogic = () => {
- const userTheme = localStorage.getItem("theme");
- if (userTheme && ["light", "dark"].includes(userTheme)) {
- document.documentElement.classList.add(`theme-${userTheme}`);
- } else {
- document.documentElement.classList.add(`theme-system`);
- if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
- document.documentElement.classList.add("theme-dark");
- } else {
- document.documentElement.classList.add("theme-light");
- }
- }
+interface RobinProviderProps {
+ theme?: Theme;
+}
- const store = localStorage.getItem("r-tabs");
- const items = store?.split(";").filter((item) => item && /[\w-]+=[\w]+/.test(item)) || [];
- const classNames = Array.from(document.documentElement.classList);
- classNames.forEach((className) => {
- if (className.startsWith(`r-tabs-global`)) {
- document.documentElement.classList.remove(className);
- }
- });
- items.forEach((item) => {
- const [tabsKey, tab] = item.split("=");
- document.documentElement.classList.add(`r-tabs-global__${tabsKey}`, `r-tabs-global__${tabsKey}_${tab}`);
- });
-};
-
-export const RobinProvider: React.FC = ({ children }) => {
- return (
- <>
-
- {children}
- >
- );
-};
+export const RobinProvider: React.FC> = ({ children, theme }) => (
+ <>
+ {theme && }
+
+ {children}
+ >
+);
diff --git a/packages/robindoc/src/core/types/theme.ts b/packages/robindoc/src/core/types/theme.ts
new file mode 100644
index 00000000..c5140452
--- /dev/null
+++ b/packages/robindoc/src/core/types/theme.ts
@@ -0,0 +1,26 @@
+export type ThemeColors = {
+ accent?: {
+ "50": string;
+ "100": string;
+ "200": string;
+ "300": string;
+ "400": string;
+ "500": string;
+ "600": string;
+ "700": string;
+ "800": string;
+ "900": string;
+ "950": string;
+ };
+ link?: {
+ base: string;
+ "base-hovered": string;
+ visited: string;
+ "visited-hovered": string;
+ active: string;
+ };
+};
+
+export type Theme = {
+ colors?: ThemeColors;
+};