File tree Expand file tree Collapse file tree 3 files changed +721
-3
lines changed
Expand file tree Collapse file tree 3 files changed +721
-3
lines changed Original file line number Diff line number Diff line change 22 jsx ,
33 useThemeUI ,
44 ThemeProvider as CoreProvider ,
5+ ThemeProviderProps as CoreThemeProviderProps ,
56 IntrinsicSxElements ,
67} from '@theme-ui/core'
78import { css , Theme } from '@theme-ui/css'
@@ -33,10 +34,16 @@ const BodyStyles = () =>
3334 } ,
3435 } )
3536
36- interface ThemeProviderProps {
37- theme : Theme
37+ type ProvidedComponentsKnownKeys = {
38+ [ key in keyof IntrinsicSxElements ] ?: React . ComponentType < any > | string
39+ }
40+ export interface ProvidedComponents extends ProvidedComponentsKnownKeys {
41+ [ key : string ] : React . ComponentType < any > | string | undefined
42+ }
43+
44+ interface ThemeProviderProps extends Pick < CoreThemeProviderProps , 'theme' > {
3845 children ?: React . ReactNode
39- components ?: { [ key in keyof IntrinsicSxElements ] ?: React . ReactNode }
46+ components ?: ProvidedComponents
4047}
4148
4249export const ThemeProvider : React . FC < ThemeProviderProps > = ( {
You can’t perform that action at this time.
0 commit comments