Skip to content

Commit 75f792b

Browse files
committed
fix: add fallbacks to jssStyle
1 parent 2b54776 commit 75f792b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/jss/src/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ type Func<P, T, R> = T extends undefined ? ((data: P) => R) : ((data: P & {theme
1616
type NormalCssProperties = CSSProperties<string | number>
1717
type NormalCssValues<K> = K extends keyof NormalCssProperties ? NormalCssProperties[K] : JssValue
1818

19-
export type JssStyle<Props = any, Theme = undefined> =
19+
export type JssStyle<Props = any, Theme = undefined> = {
20+
fallbacks: JssStyle<Props, Theme> | (JssStyle<Props, Theme>[])
21+
} & (
2022
| {
2123
[K in keyof NormalCssProperties]:
2224
| NormalCssValues<K>
@@ -30,7 +32,7 @@ export type JssStyle<Props = any, Theme = undefined> =
3032
| JssStyle<Props, Theme>
3133
| Func<Props, Theme, JssValue | JssStyle<undefined, undefined> | undefined>
3234
| MinimalObservable<JssValue | JssStyle | undefined>
33-
}
35+
})
3436

3537
export type Styles<
3638
Name extends string | number | symbol = string,

0 commit comments

Comments
 (0)