移除gitignore中的lib文件夹,上传被排除掉的前端lib文件
This commit is contained in:
15
dashboard/src/lib/theme-context.ts
Normal file
15
dashboard/src/lib/theme-context.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createContext } from 'react'
|
||||
|
||||
type Theme = 'dark' | 'light' | 'system'
|
||||
|
||||
export 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