Component library setup (#115)

This commit is contained in:
Salih Altun
2024-03-21 00:07:02 +03:00
committed by GitHub
parent a27e1dcd81
commit d2ca6ca792
14 changed files with 1543 additions and 342 deletions

View File

@@ -0,0 +1,16 @@
import { createContext } from "react";
export type Theme = "dark" | "light" | "system";
type ThemeProviderState = {
theme: Theme;
setTheme: (theme: Theme) => void;
};
const initialState: ThemeProviderState = {
theme: "system",
setTheme: () => null,
};
export const ThemeProviderContext =
createContext<ThemeProviderState>(initialState);