From f57812bbb1550b26769a2b6860e31f3ea5ef285c Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Fri, 5 Apr 2019 14:56:45 +0200 Subject: [PATCH] [test] Add undesired withStyles + generic props component behavior --- .../material-ui/test/typescript/styles.spec.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/material-ui/test/typescript/styles.spec.tsx b/packages/material-ui/test/typescript/styles.spec.tsx index a772a2b12ed353..fd0b453bd610f0 100644 --- a/packages/material-ui/test/typescript/styles.spec.tsx +++ b/packages/material-ui/test/typescript/styles.spec.tsx @@ -14,7 +14,7 @@ import { import { ThemeProvider } from '@material-ui/styles'; import Button from '@material-ui/core/Button'; import { blue } from '@material-ui/core/colors'; -import { StandardProps } from '@material-ui/core'; +import { StandardProps, ButtonBase } from '@material-ui/core'; // Shared types for examples interface ComponentProps extends WithStyles { @@ -463,3 +463,17 @@ withStyles(theme => // Property 'nonDefaulted' is missing in type '{}' const MissingPropUsage = () => ; // $ExpectError } + +// https://github.com/mui-org/material-ui/issues/14586 +{ + const styles = createStyles({ + root: { + color: 'red', + }, + }); + + const StyledButton = withStyles(styles)(Button); + + // undesired + ; // $ExpectError +}