diff --git a/system/react/src/index.ts b/system/react/src/index.ts index d6cea43c..14678e4e 100644 --- a/system/react/src/index.ts +++ b/system/react/src/index.ts @@ -154,4 +154,7 @@ export { TableButtonCell } from './structuredComponents/TableButtonCell'; export type { Props as TableButtonCellProps } from './structuredComponents/TableButtonCell'; export { TextArea } from './structuredComponents/TextArea'; export type { Props as TextAreaProps } from './structuredComponents/TextArea'; -export { ThemeProvider } from './structuredComponents/ThemeProvider'; +export { + useTablekitTheme, + ThemeProvider +} from './structuredComponents/ThemeProvider'; diff --git a/system/react/src/structuredComponents/ThemeProvider.tsx b/system/react/src/structuredComponents/ThemeProvider.tsx index e49c5a2f..e5a94369 100644 --- a/system/react/src/structuredComponents/ThemeProvider.tsx +++ b/system/react/src/structuredComponents/ThemeProvider.tsx @@ -1,7 +1,8 @@ import { ThemeProvider as EmotionThemeProvider, Global, - css + css, + useTheme } from '@emotion/react'; import { constants, @@ -54,6 +55,8 @@ function useIsDark(theme: 'light' | 'dark' | 'system') { return isDark; } +export const useTablekitTheme = useTheme; + export function ThemeProvider({ isRtl = false, lang,