Skip to content

Commit 622a00c

Browse files
[docs] Polish typography demos
1 parent 536c3c0 commit 622a00c

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

docs/src/pages/customization/typography/CustomResponsiveFontSizes.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ theme.typography.h3 = {
1414
},
1515
};
1616

17-
export default function ResponsiveFontSizes() {
17+
export default function CustomResponsiveFontSizes() {
1818
return (
19-
<div>
20-
<ThemeProvider theme={theme}>
21-
<Typography variant="h3">Responsive h3</Typography>
22-
</ThemeProvider>
23-
</div>
19+
<ThemeProvider theme={theme}>
20+
<Typography variant="h3">Responsive h3</Typography>
21+
</ThemeProvider>
2422
);
2523
}

docs/src/pages/customization/typography/CustomResponsiveFontSizes.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ theme.typography.h3 = {
1414
},
1515
};
1616

17-
export default function ResponsiveFontSizes() {
17+
export default function CustomResponsiveFontSizes() {
1818
return (
19-
<div>
20-
<ThemeProvider theme={theme}>
21-
<Typography variant="h3">Responsive h3</Typography>
22-
</ThemeProvider>
23-
</div>
19+
<ThemeProvider theme={theme}>
20+
<Typography variant="h3">Responsive h3</Typography>
21+
</ThemeProvider>
2422
);
2523
}

docs/src/pages/customization/typography/TypographyVariants.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const theme = createMuiTheme({
1919

2020
export default function TypographyVariants() {
2121
return (
22-
<ThemeProvider theme={theme}>
23-
<div>
22+
<div>
23+
<ThemeProvider theme={theme}>
2424
<Typography variant="subtitle1">subtitle</Typography>
2525
<Typography>body1</Typography>
2626
<Button>Button</Button>
27-
</div>
28-
</ThemeProvider>
27+
</ThemeProvider>
28+
</div>
2929
);
3030
}

docs/src/pages/customization/typography/TypographyVariants.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const theme = createMuiTheme({
1919

2020
export default function TypographyVariants() {
2121
return (
22-
<ThemeProvider theme={theme}>
23-
<div>
22+
<div>
23+
<ThemeProvider theme={theme}>
2424
<Typography variant="subtitle1">subtitle</Typography>
2525
<Typography>body1</Typography>
2626
<Button>Button</Button>
27-
</div>
28-
</ThemeProvider>
27+
</ThemeProvider>
28+
</div>
2929
);
3030
}

docs/src/pages/customization/typography/typography.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const raleway = {
5656
Next, you need to change the theme to use this new font.
5757
In order to globally define Raleway as a font face, the [`CssBaseline`](/components/css-baseline/) component can be used (or any other CSS solution of your choice).
5858

59-
```js
59+
```jsx
6060
const theme = createMuiTheme({
6161
typography: {
6262
fontFamily: 'Raleway, Arial',
@@ -71,10 +71,12 @@ const theme = createMuiTheme({
7171
});
7272

7373
// ...
74-
<ThemeProvider theme={theme}>
75-
<CssBaseline />
76-
{children}
77-
</ThemeProvider>;
74+
return (
75+
<ThemeProvider theme={theme}>
76+
<CssBaseline />
77+
{children}
78+
</ThemeProvider>
79+
);
7880
```
7981

8082
## Font size

0 commit comments

Comments
 (0)