Skip to content

Commit

Permalink
[core] Fix imports to React
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jul 7, 2023
1 parent 2369168 commit 87a0bea
Show file tree
Hide file tree
Showing 36 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/data/joy/customization/dark-mode/dark-mode-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class MyDocument extends Document {
To use the Joy UI API with a Next.js project, add the following code to the custom [`gatsby-ssr.js`](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) file:

```jsx
import React from 'react';
import * as React from 'react';
import { getInitColorSchemeScript } from '@mui/joy/styles';

export function onRenderBody({ setPreBodyComponents }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/customization/dark-mode/dark-mode-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class MyDocument extends Document {
To use the Joy UI API with a Next.js project, add the following code to the custom [`gatsby-ssr.js`](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) file:

```jsx
import React from 'react';
import * as React from 'react';
import { getInitColorSchemeScript } from '@mui/joy/styles';

export function onRenderBody({ setPreBodyComponents }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/customization/dark-mode/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default class MyDocument extends Document {
To use the Joy UI API with a Gatsby project, add the following code to the custom [`gatsby-ssr.js`](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) file:

```jsx
import React from 'react';
import * as React from 'react';
import { getInitColorSchemeScript } from '@mui/joy/styles';

export function onRenderBody({ setPreBodyComponents }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/getting-started/tutorial/tutorial-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ import Link from '@mui/joy/Link';
Joy UI provides an effortless way to toggle between modes by using the React hook `useColorScheme`. All you need to do is create a component that uses the hook and then render it under the `CssVarsProvider` component.
```jsx
import React from 'react';
import * as React from 'react';
import { CssVarsProvider, useColorScheme } from '@mui/joy/styles';
// ...other imports
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/getting-started/tutorial/tutorial-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ import Link from '@mui/joy/Link';
Joy UI provides an effortless way to toggle between modes by using the React hook `useColorScheme`. All you need to do is create a component that uses the hook and then render it under the `CssVarsProvider` component.
```jsx
import React from 'react';
import * as React from 'react';
import { CssVarsProvider, useColorScheme } from '@mui/joy/styles';
// ...other imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class MyDocument extends Document {
Place the script in your [`gatsby-ssr.js`](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) file:
```jsx
import React from 'react';
import * as React from 'react';
import { getInitColorSchemeScript } from '@mui/material/styles';

export function onRenderBody({ setPreBodyComponents }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class MyDocument extends Document {
Add the following code to the custom [`gatsby-ssr.js`](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) file:
```jsx
import React from 'react';
import * as React from 'react';
import { getInitColorSchemeScript } from '@mui/material/styles';
export function onRenderBody({ setPreBodyComponents }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ npx @mui/codemod v5.0.0/jss-to-tss-react <path>
Example transformation:

```diff
import React from 'react';
import * as React from 'react';
-import makeStyles from '@material-ui/styles/makeStyles';
+import { makeStyles } from 'tss-react/mui';
import Button from '@mui/material/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ npx @mui/codemod v5.0.0/jss-to-tss-react <path>
示例转换:

```diff
import React from 'react';
import * as React from 'react';
-import makeStyles from '@material-ui/styles/makeStyles';
+import { makeStyles } from 'tss-react/mui';
import Button from '@mui/material/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ npx @mui/codemod v5.0.0/jss-to-tss-react <path>
Example transformation:

```diff
import React from 'react';
import * as React from 'react';
-import makeStyles from '@material-ui/styles/makeStyles';
+import { makeStyles } from 'tss-react/mui';
import Button from '@mui/material/Button';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function App() {
}

// main.js
import React from 'react';
import * as React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { CssVarsProvider } from './CssVarsProvider';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Typography from '@material-ui/core/Typography';
import MuiLink from '@material-ui/core/Link';
import Container from 'modules/components/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import Typography from '@material-ui/core/Typography';
import MuiLink from '@material-ui/core/Link';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import SomeNamespace from 'SomeNamespace';
import makeStyles from '@material-ui/styles/makeStyles';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import SomeNamespace from 'SomeNamespace';
const PREFIX = 'eleventh';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Typography from '@material-ui/core/Typography';
import makeStyles from '@material-ui/styles/makeStyles';
import Container from 'modules/components/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';import * as React from 'react';
import { styled } from '@mui/material/styles';
import Typography from '@material-ui/core/Typography';
import Container from 'modules/components/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { connect } from 'react-redux';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Button from '@mui/material/Button';
import withStyles from '@mui/styles/withStyles';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import Button from '@mui/material/Button';
const PREFIX = 'Test';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import Typography from '@material-ui/core/Typography';
import makeStyles from '@material-ui/styles/makeStyles';
import Container from 'modules/components/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import Typography from '@material-ui/core/Typography';
import Container from 'modules/components/Container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import makeStyles from '@material-ui/styles/makeStyles';
import CircularProgress from '@material-ui/core/CircularProgress';
import { withPrefix, navigate } from 'gatsby';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import CircularProgress from '@material-ui/core/CircularProgress';
import { withPrefix, navigate } from 'gatsby';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import IconButton from '@material-ui/core/IconButton';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import makeStyles from '@material-ui/styles/makeStyles';

const useStyles = makeStyles((theme) => ({
Expand All @@ -22,4 +22,4 @@ export default function Page() {
<img className={classes.img}></img>
</>
);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { styled } from '@mui/material/styles';
const PREFIX = 'tenth';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import makeStyles from '@material-ui/styles/makeStyles';

const useStyles = makeStyles((theme) => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-codemod/src/v5.0.0/preset-safe.test/actual.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
MuiThemeProvider,
createMuiTheme,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ThemeProvider, StyledEngineProvider, createTheme, alpha, adaptV4Theme } from '@mui/material/styles';
import makeStyles from '@mui/styles/makeStyles';
import StylesProvider from '@mui/styles/StylesProvider';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core';
import { OtherProvider } from './contexts';
import Page from './pages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { MuiThemeProvider, StyledEngineProvider, createMuiTheme } from '@material-ui/core';
import { OtherProvider } from './contexts';
import Page from './pages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ThemeProvider, createTheme } from '@material-ui/core/styles';
import { OtherProvider } from './contexts';
import Page from './pages';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ThemeProvider, StyledEngineProvider, createTheme } from '@material-ui/core/styles';
import { OtherProvider } from './contexts';
import Page from './pages';
Expand Down

0 comments on commit 87a0bea

Please sign in to comment.