@@ -11,11 +11,13 @@ declare namespace goober {
11
11
12
12
interface StyledFunction {
13
13
// used when creating a styled component from a native HTML element
14
- < T extends keyof JSX . IntrinsicElements , P extends Object = { } > (
14
+ < T extends keyof React . JSX . IntrinsicElements , P extends Object = { } > (
15
15
tag : T ,
16
16
forwardRef ?: ForwardRefFunction
17
17
) : Tagged <
18
- JSX . LibraryManagedAttributes < T , JSX . IntrinsicElements [ T ] > & P & Theme < DefaultTheme >
18
+ React . JSX . LibraryManagedAttributes < T , React . JSX . IntrinsicElements [ T ] > &
19
+ P &
20
+ Theme < DefaultTheme >
19
21
> ;
20
22
21
23
// used to extend other styled components. Inherits props from the extended component
@@ -26,19 +28,22 @@ declare namespace goober {
26
28
27
29
// used when creating a component from a string (html native) but using a non HTML standard
28
30
// component, such as when you want to style web components
29
- < P extends Object = { } > ( tag : string ) : Tagged < P & Partial < JSX . ElementChildrenAttribute > > ;
31
+ < P extends Object = { } > ( tag : string ) : Tagged <
32
+ P & Partial < React . JSX . ElementChildrenAttribute >
33
+ > ;
30
34
31
35
// used to create a styled component from a JSX element (both functional and class-based)
32
- < T extends JSX . Element | JSX . ElementClass , P extends Object = { } > (
36
+ < T extends React . JSX . Element | React . JSX . ElementClass , P extends Object = { } > (
33
37
tag : T ,
34
38
forwardRef ?: ForwardRefFunction
35
39
) : Tagged < P > ;
36
40
}
37
41
38
42
// used when creating a styled component from a native HTML element with the babel-plugin-transform-goober parser
39
43
type BabelPluginTransformGooberStyledFunction = {
40
- [ T in keyof JSX . IntrinsicElements ] : Tagged <
41
- JSX . LibraryManagedAttributes < T , JSX . IntrinsicElements [ T ] > & Theme < DefaultTheme >
44
+ [ T in keyof React . JSX . IntrinsicElements ] : Tagged <
45
+ React . JSX . LibraryManagedAttributes < T , React . JSX . IntrinsicElements [ T ] > &
46
+ Theme < DefaultTheme >
42
47
> ;
43
48
} ;
44
49
0 commit comments