Component library setup (#115)
This commit is contained in:
16
skyvern-frontend/src/components/themeProviderContext.ts
Normal file
16
skyvern-frontend/src/components/themeProviderContext.ts
Normal 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);
|
||||
Reference in New Issue
Block a user