11 lines
240 B
TypeScript
11 lines
240 B
TypeScript
import { createContext } from 'react'
|
|
|
|
export type Theme = 'dark' | 'light'
|
|
|
|
export interface ThemeContextType {
|
|
theme: Theme
|
|
toggleTheme: () => void
|
|
}
|
|
|
|
export const ThemeContext = createContext<ThemeContextType | undefined>(undefined)
|