14 lines
274 B
TypeScript
14 lines
274 B
TypeScript
import { createContext } from "react";
|
|
|
|
export type Theme = "light" | "dark";
|
|
|
|
export type ThemeContextType = {
|
|
theme: Theme;
|
|
setTheme: (theme: Theme) => void;
|
|
};
|
|
|
|
export const ThemeContext = createContext<ThemeContextType>({
|
|
theme: "light",
|
|
setTheme: () => {},
|
|
});
|