Skip to content

Commit

Permalink
removed migration guide around classes & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Nov 13, 2020
1 parent 814b2ec commit 5ce5b30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 39 deletions.
6 changes: 5 additions & 1 deletion docs/src/modules/utils/generateMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ function generatePropType(type: PropTypeDescriptor): string | undefined {
}

function generateName(reactAPI: ReactApi) {
if (reactAPI.styles.classes.length && !reactAPI.styles.name && reactAPI.name.indexOf('Unstyled') === -1) {
if (
reactAPI.styles.classes.length &&
!reactAPI.styles.name &&
reactAPI.name.indexOf('Unstyled') === -1
) {
throw new Error(`Missing styles name on ${reactAPI.name} component`);
}

Expand Down
38 changes: 0 additions & 38 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,44 +751,6 @@ const classes = makeStyles(theme => ({
+<Slider components={{ Thumb: CustomThumb }} />
```

- The `classes` prop is no longer available for styling the component. You can fix this by one of these options:

1. Move these overrides to the theme's components overrides section

```diff
- const useStyles = makeStyles({
- root: {
- margin: '10px',
- },
- colorPrimary: {
- backgroundColor: '#232323',
- }
- });
+ const theme = createMuiTheme({
+ components: {
+ MuiSlider: {
+ styleOverrides: {
+ root: {
+ margin: '10px',
+ },
+ colorPrimary: {
+ backgroundColor: '#232323',
+ },
+ },
+ },
+ },
+ });
// ...
- const classes = useStyles();
// ...
+ <ThemeProvider theme={theme}>
// ...
- <Slider classes={classes}>
+ <Slider />
```

or 2. you can follow one of the overrides approach described on the ([Style Library Interoperability](/guides/interoperability/)) page. The class names for the Slider component can be find on the [API page](/api/slider/#css).

### Snackbar

- The notification now displays at the bottom left on large screens.
Expand Down

0 comments on commit 5ce5b30

Please sign in to comment.