From d1fc97c4e163e50211ed22f96e0eeca404cb3e3f Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Mon, 26 Sep 2022 18:40:15 +0200 Subject: [PATCH] [docs] Update the guide for migrating to TSS (#34417) --- .../migration-v4/migrating-from-jss-pt.md | 23 ------------------- .../migration-v4/migrating-from-jss-zh.md | 23 ------------------- .../migration-v4/migrating-from-jss.md | 23 ------------------- 3 files changed, 69 deletions(-) diff --git a/docs/data/material/migration/migration-v4/migrating-from-jss-pt.md b/docs/data/material/migration/migration-v4/migrating-from-jss-pt.md index 9177158e6ab55c..be19feb5a016e8 100644 --- a/docs/data/material/migration/migration-v4/migrating-from-jss-pt.md +++ b/docs/data/material/migration/migration-v4/migrating-from-jss-pt.md @@ -208,29 +208,6 @@ With yarn: yarn add tss-react ``` -You will also need to edit your providers: - -```diff - import { render } from 'react-dom'; --import { StylesProvider } from '@material-ui/core/styles'; -+import createCache from '@emotion/cache'; -+import { CacheProvider } from "@emotion/react"; - -+export const muiCache = createCache({ -+ 'key': 'mui', -+ 'prepend': true, -+}); - - render( -- -+ - -- , -+ , - document.getElementById('root') - ); -``` - #### Codemod We provide [a codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#jss-to-tss-react) to help migrate JSS styles to the `tss-react` API. diff --git a/docs/data/material/migration/migration-v4/migrating-from-jss-zh.md b/docs/data/material/migration/migration-v4/migrating-from-jss-zh.md index 506000bb4d2726..580dca67c2362c 100644 --- a/docs/data/material/migration/migration-v4/migrating-from-jss-zh.md +++ b/docs/data/material/migration/migration-v4/migrating-from-jss-zh.md @@ -207,29 +207,6 @@ npm install tss-react yarn add tss-react ``` -你还需要编辑你的提供者: - -```diff - import { render } from 'react-dom'; --import { StylesProvider } from '@material-ui/core/styles'; -+import createCache from '@emotion/cache'; -+import { CacheProvider } from "@emotion/react"; - -+export const muiCache = createCache({ -+ 'key': 'mui', -+ 'prepend': true, -+}); - - render( -- -+ - -- , -+ , - document.getElementById('root') - ); -``` - #### Codemod 我们提供了[一个codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#jss-to-tss-react)来帮助将JSS样式迁移到`tss-react` API。 diff --git a/docs/data/material/migration/migration-v4/migrating-from-jss.md b/docs/data/material/migration/migration-v4/migrating-from-jss.md index dba41dbc28f8af..e08c470fddfa8c 100644 --- a/docs/data/material/migration/migration-v4/migrating-from-jss.md +++ b/docs/data/material/migration/migration-v4/migrating-from-jss.md @@ -212,29 +212,6 @@ With yarn: yarn add tss-react ``` -You will also need to edit your providers: - -```diff - import { render } from 'react-dom'; --import { StylesProvider } from '@material-ui/core/styles'; -+import createCache from '@emotion/cache'; -+import { CacheProvider } from "@emotion/react"; - -+export const muiCache = createCache({ -+ 'key': 'mui', -+ 'prepend': true, -+}); - - render( -- -+ - -- , -+ , - document.getElementById('root') - ); -``` - #### Codemod We provide [a codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#jss-to-tss-react) to help migrate JSS styles to the `tss-react` API.