Skip to content

Commit

Permalink
[docs] Remove dead NoSsr in the demos (#33910)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 15, 2022
1 parent e79f0e3 commit 4df801d
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 67 deletions.
17 changes: 4 additions & 13 deletions docs/data/material/customization/transitions/TransitionHover.js
@@ -1,10 +1,5 @@
import * as React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import NoSsr from '@mui/material/NoSsr';
import {
createTheme,
ThemeProvider as MuiThemeProvider,
} from '@mui/material/styles';
import { styled, createTheme, ThemeProvider } from '@mui/material/styles';
import { deepPurple } from '@mui/material/colors';
import Avatar from '@mui/material/Avatar';

Expand Down Expand Up @@ -32,12 +27,8 @@ const StyledAvatar = styled(Avatar)`

export default function TransitionHover() {
return (
<NoSsr>
<MuiThemeProvider theme={customTheme}>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
</MuiThemeProvider>
</NoSsr>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
);
}
17 changes: 4 additions & 13 deletions docs/data/material/customization/transitions/TransitionHover.tsx
@@ -1,10 +1,5 @@
import * as React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import NoSsr from '@mui/material/NoSsr';
import {
createTheme,
ThemeProvider as MuiThemeProvider,
} from '@mui/material/styles';
import { styled, createTheme, ThemeProvider } from '@mui/material/styles';
import { deepPurple } from '@mui/material/colors';
import Avatar from '@mui/material/Avatar';

Expand Down Expand Up @@ -32,12 +27,8 @@ const StyledAvatar = styled(Avatar)`

export default function TransitionHover() {
return (
<NoSsr>
<MuiThemeProvider theme={customTheme}>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
</MuiThemeProvider>
</NoSsr>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
);
}
@@ -1,7 +1,3 @@
<NoSsr>
<MuiThemeProvider theme={customTheme}>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
</MuiThemeProvider>
</NoSsr>
<ThemeProvider theme={customTheme}>
<StyledAvatar>OP</StyledAvatar>
</ThemeProvider>
@@ -1,7 +1,6 @@
import * as React from 'react';
import styled from 'styled-components';
import { palette, spacing } from '@mui/system';
import NoSsr from '@mui/base/NoSsr';

const Div = styled.div`
${palette}
Expand All @@ -10,10 +9,8 @@ const Div = styled.div`

export default function CombiningStyleFunctionsDemo() {
return (
<NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
</NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
);
}
@@ -1,7 +1,6 @@
import * as React from 'react';
import styled from 'styled-components';
import { palette, PaletteProps, spacing, SpacingProps } from '@mui/system';
import NoSsr from '@mui/base/NoSsr';

const Div = styled.div<PaletteProps & SpacingProps>`
${palette}
Expand All @@ -10,10 +9,8 @@ const Div = styled.div<PaletteProps & SpacingProps>`

export default function CombiningStyleFunctionsDemo() {
return (
<NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
</NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
);
}
@@ -1,5 +1,3 @@
<NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
</NoSsr>
<Div color="white" bgcolor="palevioletred" p={1}>
Styled components
</Div>
@@ -1,7 +1,6 @@
import * as React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import { unstable_styleFunctionSx } from '@mui/system';
import NoSsr from '@mui/base/NoSsr';
import { createTheme } from '@mui/material/styles';

const theme = createTheme();
Expand All @@ -10,10 +9,8 @@ const Div = styled('div')(unstable_styleFunctionSx);

export default function StyleFunctionSxDemo() {
return (
<NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>
</NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>
);
}
@@ -1,7 +1,6 @@
import * as React from 'react';
import styled, { InterpolationFunction, ThemeProvider } from 'styled-components';
import { unstable_styleFunctionSx, SxProps } from '@mui/system';
import NoSsr from '@mui/base/NoSsr';
import { createTheme } from '@mui/material/styles';

interface DivProps {
Expand All @@ -16,10 +15,8 @@ const Div = styled('div')<DivProps>(

export default function StyleFunctionSxDemo() {
return (
<NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>
</NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>
);
}
@@ -1,5 +1,3 @@
<NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>
</NoSsr>
<ThemeProvider theme={theme}>
<Div sx={{ m: 1, p: 1, border: 1 }}>Custom component with the sx prop</Div>
</ThemeProvider>

0 comments on commit 4df801d

Please sign in to comment.