mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-09 22:50:06 +08:00
* feat: export all types related to components fix(tooltip): fix the vertical offset of the arrow * refactor: optimize events of all popup related components * test: append testcases for popup base component * test: add testcase for visible events * test: update snapshots
10 lines
360 B
TypeScript
10 lines
360 B
TypeScript
import React from 'react'
|
|
import Themes from '../themes'
|
|
import { GeistUIThemes } from '../themes/presets'
|
|
|
|
const defaultTheme = Themes.getPresetStaticTheme()
|
|
|
|
export const ThemeContext: React.Context<GeistUIThemes> =
|
|
React.createContext<GeistUIThemes>(defaultTheme)
|
|
export const useTheme = (): GeistUIThemes => React.useContext<GeistUIThemes>(ThemeContext)
|