-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Add breaking change in upgrade guide
- Loading branch information
1 parent
a28a218
commit a37d8a4
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | ||
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown'; | ||
|
||
const pageFilename = 'guides/migration-v4'; | ||
const requireDemo = require.context('docs/src/pages/guides/migration-v4', false, /\.(js|tsx)$/); | ||
const requireRaw = require.context( | ||
'!raw-loader!../../src/pages/guides/migration-v4', | ||
false, | ||
/\.(js|md|tsx)$/, | ||
); | ||
|
||
export default function Page({ demos, docs }) { | ||
return <MarkdownDocs demos={demos} docs={docs} requireDemo={requireDemo} />; | ||
} | ||
|
||
Page.getInitialProps = () => { | ||
const { demos, docs } = prepareMarkdown({ pageFilename, requireRaw }); | ||
return { demos, docs }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Migration from v3 to v4 | ||
|
||
<p class="description">Yeah, v4 has been released!</p> | ||
|
||
Looking for the v4 docs? [Find them here](https://material-ui.com/versions/). | ||
|
||
> This document is a work in progress. | ||
Have you upgraded your site and run into something that's not covered here? | ||
[Add your changes on GitHub](https://github.com/mui-org/material-ui/blob/master/docs/src/pages/guides/migration-v3/migration-v3.md). | ||
|
||
## Introduction | ||
|
||
This is a reference for upgrading your site from Material-UI v4 to v5. | ||
While there's a lot covered here, you probably won't need to do everything for your site. | ||
We'll do our best to keep things easy to follow, and as sequential as possible so you can quickly get rocking on v5! | ||
|
||
## Why you should migrate | ||
|
||
This documentation page covers the *how* of migrating from v4 to v5. | ||
The *why* is covered in the [release blog post on Medium](https://medium.com/material-ui/material-ui-v4-is-out-4b7587d1e701). | ||
|
||
## Updating your dependencies | ||
|
||
The very first thing you will need to do is to update your dependencies. | ||
|
||
### Update Material-UI version | ||
|
||
You need to update your `package.json` to use the latest version of Material-UI. | ||
|
||
```json | ||
"dependencies": { | ||
"@material-ui/core": "^5.0.0" | ||
} | ||
``` | ||
|
||
Or run | ||
|
||
```sh | ||
npm install @material-ui/core | ||
|
||
or | ||
|
||
yarn add @material-ui/core | ||
``` | ||
|
||
## Handling breaking changes | ||
|
||
### Divider | ||
|
||
- [Divider] Use border instead of background color. It prevents inconsistent height on scaled screens. For people customzing the color of the border, the change requires changing the override CSS property: | ||
|
||
```diff | ||
.MuiDivider-root { | ||
- border-color: #f00; | ||
+ background-color: #f00; | ||
} | ||
``` |