File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -45,25 +45,25 @@ interface WithStylesProps<S extends Styles | ((theme: unknown) => Styles)> {
45
45
*/
46
46
type WithStyles < S extends Styles | ( ( theme : unknown ) => Styles ) > = WithStylesProps < S >
47
47
48
- interface BaseOptions extends StyleSheetFactoryOptions {
48
+ export interface DefaultTheme { }
49
+
50
+ interface BaseOptions < Theme = DefaultTheme > extends StyleSheetFactoryOptions {
49
51
index ?: number
50
- theming ?: Theming < object >
52
+ theming ?: Theming < Theme >
51
53
}
52
54
53
55
interface WithStylesOptions extends BaseOptions {
54
56
injectTheme ?: boolean
55
57
jss ?: Jss
56
58
}
57
59
58
- interface CreateUseStylesOptions extends BaseOptions {
60
+ interface CreateUseStylesOptions < Theme = DefaultTheme > extends BaseOptions < Theme > {
59
61
name ?: string
60
62
}
61
63
62
- export interface DefaultTheme { }
63
-
64
64
declare function createUseStyles < Theme = DefaultTheme , C extends string = string > (
65
65
styles : Record < C , any > | ( ( theme : Theme ) => Record < C , any > ) ,
66
- options ?: CreateUseStylesOptions
66
+ options ?: CreateUseStylesOptions < Theme >
67
67
) : ( data ?: unknown ) => Classes < C >
68
68
69
69
declare function withStyles <
@@ -93,6 +93,7 @@ export {
93
93
ThemeProvider ,
94
94
withTheme ,
95
95
createTheming ,
96
+ Theming ,
96
97
useTheme ,
97
98
JssContext ,
98
99
createUseStyles ,
You can’t perform that action at this time.
0 commit comments