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 2
2
jsx ,
3
3
useThemeUI ,
4
4
ThemeProvider as CoreProvider ,
5
+ ThemeProviderProps as CoreThemeProviderProps ,
5
6
IntrinsicSxElements ,
6
7
} from '@theme-ui/core'
7
8
import { css , Theme } from '@theme-ui/css'
@@ -33,10 +34,16 @@ const BodyStyles = () =>
33
34
} ,
34
35
} )
35
36
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' > {
38
45
children ?: React . ReactNode
39
- components ?: { [ key in keyof IntrinsicSxElements ] ?: React . ReactNode }
46
+ components ?: ProvidedComponents
40
47
}
41
48
42
49
export const ThemeProvider : React . FC < ThemeProviderProps > = ( {
You can’t perform that action at this time.
0 commit comments