Skip to content

Commit 78f5ec8

Browse files
committed
Simplify CSSProperties
1 parent d345232 commit 78f5ec8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/material-ui-styles/src/withStyles/withStyles.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ export type StyleRules<Props extends object = {}, ClassKey extends string = stri
5252
ClassKey,
5353
// JSS property bag
5454
| CSSProperties
55-
// JSS property bag based on a theme
56-
| (() => CSSProperties)
5755
// JSS property bag where values are based on props
5856
| CreateCSSProperties<Props>
5957
// JSS property bag based on props

packages/material-ui-styles/test/styles.spec.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -455,14 +455,14 @@ function forwardRefTest() {
455455
// If there are no props, use the definition that doesn't accept them
456456
// https://github.com/mui-org/material-ui/issues/16198
457457

458-
// $ExpectType Record<"root", CSSProperties | (() => CSSProperties) | CreateCSSProperties<{}> | ((props: {}) => CreateCSSProperties<{}>)>
458+
// $ExpectType Record<"root", CSSProperties | CreateCSSProperties<{}> | ((props: {}) => CreateCSSProperties<{}>)>
459459
const styles = createStyles({
460460
root: {
461461
width: 1,
462462
},
463463
});
464464

465-
// $ExpectType Record<"root", CSSProperties | (() => CSSProperties) | CreateCSSProperties<{}> | ((props: {}) => CreateCSSProperties<{}>)>
465+
// $ExpectType Record<"root", CSSProperties | CreateCSSProperties<{}> | ((props: {}) => CreateCSSProperties<{}>)>
466466
const styles2 = createStyles({
467467
root: () => ({
468468
width: 1,
@@ -473,7 +473,7 @@ function forwardRefTest() {
473473
foo: boolean;
474474
}
475475

476-
// $ExpectType Record<"root", CSSProperties | (() => CSSProperties) | CreateCSSProperties<testProps> | ((props: testProps) => CreateCSSProperties<testProps>)>
476+
// $ExpectType Record<"root", CSSProperties | CreateCSSProperties<testProps> | ((props: testProps) => CreateCSSProperties<testProps>)>
477477
const styles3 = createStyles({
478478
root: (props: testProps) => ({
479479
width: 1,

0 commit comments

Comments
 (0)