Skip to content

Commit

Permalink
[docs] Update Typography in migration guide (mui#24662)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes authored and natac13 committed Jan 30, 2021
1 parent 3c4a3e0 commit 14a5bad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -1220,17 +1220,13 @@ As the core components use emotion as a styled engine, the props used by emotion

### Typography

- Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://material-ui.com/system/basics/):
- Remove the `srOnly` variant. You can use the `visuallyHidden` utility in conjunction with the `sx` prop instead.

```diff
-import Typography from '@material-ui/core/Typography';
+import { visuallyHidden } from '@material-ui/system';
+import styled from 'styled-component';

+const Span = styled('span')(visuallyHidden);
+import { visuallyHidden } from '@material-ui/utils';

-<Typography variant="srOnly">Create a user</Typography>
+<Span>Create a user</Span>
+<span style={visuallyHidden}>Create a user</span>
```

### System
Expand Down

0 comments on commit 14a5bad

Please sign in to comment.