You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
418 B
18 lines
418 B
import { useAppStore } from "@core/stores/appStore.ts";
|
|
import type { ReactNode } from "react";
|
|
|
|
export interface ThemeControllerProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export const ThemeController = ({
|
|
children,
|
|
}: ThemeControllerProps): JSX.Element => {
|
|
const { darkMode, accent } = useAppStore();
|
|
|
|
return (
|
|
<div data-theme={darkMode ? "dark" : "light"} data-accent={accent}>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|