Skip to content

Commit

Permalink
Document undesired behavior in newer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Nov 12, 2019
1 parent 1f89709 commit 13b3075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/styles/advanced/GlobalClassName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const StyledTextField = styled(TextField)`
border-color: green;
}
}
`;
` as typeof TextField;

export default function GlobalClassName() {
return (
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/test/typescript/hoc-interop.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const filledProps = {
// styled
{
const StyledTextField = styled(TextField)``;
<StyledTextField variant="filled" {...filledProps} />;
// $ExpectError
<StyledTextField variant="filled" {...filledProps} />; // undesired, fixable by using older version 4.1.20
// $ExpectError
<StyledTextField {...filledProps} />; // desired
}
Expand Down

0 comments on commit 13b3075

Please sign in to comment.