diff --git a/packages/theme/src/emotion/theme-provider.tsx b/packages/theme/src/emotion/theme-provider.tsx index 9a1f3b2e2..7de3b35c7 100644 --- a/packages/theme/src/emotion/theme-provider.tsx +++ b/packages/theme/src/emotion/theme-provider.tsx @@ -23,7 +23,8 @@ import { useThemeColors, useThemeEngineStore, ScopedThemeProvider as NNScopedThemeProvider, - ThemeFactory + ThemeFactory, + Theme } from "../"; import React, { ForwardedRef, PropsWithChildren, useMemo } from "react"; import { Box, BoxProps } from "@theme-ui/components"; @@ -45,7 +46,7 @@ function _EmotionThemeProvider( className, ...restProps } = props; - const emotionTheme = useTheme(); + const emotionTheme = useTheme() as Theme; const theme = useThemeEngineStore((store) => store.theme); const themeScope = useThemeColors(scope); const { colors } = themeScope; @@ -62,7 +63,9 @@ function _EmotionThemeProvider( return (