Open History to see the last commit
1import * as React from 'react'
2β
3export const defaultTheme = {
4 background: '#0b1521',
5 backgroundAlt: '#132337',
6 foreground: 'white',
7 gray: '#3f4e60',
8 grayAlt: '#222e3e',
9 inputBackgroundColor: '#fff',
10 inputTextColor: '#000',
11 success: '#00ab52',
12 danger: '#ff0085',
13 active: '#006bff',
14 paused: '#8c49eb',
15 warning: '#ffb200',
16} as const
17β
18export type Theme = typeof defaultTheme
19interface ProviderProps {
20 theme: Theme
21 children?: React.ReactNode
22}
23β
24const ThemeContext = React.createContext(defaultTheme)
25β
26export function ThemeProvider({ theme, ...rest }: ProviderProps) {
27 return <ThemeContext.Provider value={theme} {...rest} />
28}
29β
30export function useTheme() {
31 return React.useContext(ThemeContext)
32}