Skip to content

Commit

Permalink
[docs] Polish typography demos
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 27, 2020
1 parent 536c3c0 commit 622a00c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ theme.typography.h3 = {
},
};

export default function ResponsiveFontSizes() {
export default function CustomResponsiveFontSizes() {
return (
<div>
<ThemeProvider theme={theme}>
<Typography variant="h3">Responsive h3</Typography>
</ThemeProvider>
</div>
<ThemeProvider theme={theme}>
<Typography variant="h3">Responsive h3</Typography>
</ThemeProvider>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ theme.typography.h3 = {
},
};

export default function ResponsiveFontSizes() {
export default function CustomResponsiveFontSizes() {
return (
<div>
<ThemeProvider theme={theme}>
<Typography variant="h3">Responsive h3</Typography>
</ThemeProvider>
</div>
<ThemeProvider theme={theme}>
<Typography variant="h3">Responsive h3</Typography>
</ThemeProvider>
);
}
8 changes: 4 additions & 4 deletions docs/src/pages/customization/typography/TypographyVariants.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const theme = createMuiTheme({

export default function TypographyVariants() {
return (
<ThemeProvider theme={theme}>
<div>
<div>
<ThemeProvider theme={theme}>
<Typography variant="subtitle1">subtitle</Typography>
<Typography>body1</Typography>
<Button>Button</Button>
</div>
</ThemeProvider>
</ThemeProvider>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const theme = createMuiTheme({

export default function TypographyVariants() {
return (
<ThemeProvider theme={theme}>
<div>
<div>
<ThemeProvider theme={theme}>
<Typography variant="subtitle1">subtitle</Typography>
<Typography>body1</Typography>
<Button>Button</Button>
</div>
</ThemeProvider>
</ThemeProvider>
</div>
);
}
12 changes: 7 additions & 5 deletions docs/src/pages/customization/typography/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const raleway = {
Next, you need to change the theme to use this new font.
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).

```js
```jsx
const theme = createMuiTheme({
typography: {
fontFamily: 'Raleway, Arial',
Expand All @@ -71,10 +71,12 @@ const theme = createMuiTheme({
});

// ...
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>;
return (
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>
);
```

## Font size
Expand Down

0 comments on commit 622a00c

Please sign in to comment.