Skip to contentOpen History to see the last commit
theme.tsx
13 lines272 Bytes
3import React from 'react' 5const ThemeContext = React.createContext() 7export function ThemeProvider({ theme, ...rest }) { 8 return <ThemeContext.Provider value={theme} {...rest} /> 11export function useTheme() { 12 return React.useContext(ThemeContext)