/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/data/material/customization/typography/TypographyVariants.js
29 строк
629 B
Brijesh Bittu
[code-infra] Remove React import requirement for jsx (#47146)
29 окт 2025, 20:55
Не верифицирован
29 окт 2025, 20:55
6c9e82f
Код
Авторство
О чём код?
import { createTheme, ThemeProvider } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import Button from '@mui/material/Button'; const theme = createTheme({ typography: { subtitle1: { fontSize: 12, }, body1: { fontWeight: 500, }, button: { fontStyle: 'italic', }, }, }); export default function TypographyVariants() { return ( <div> <ThemeProvider theme={theme}> <Typography variant="subtitle1">subtitle</Typography> <Typography>body1</Typography> <Button>Button</Button> </ThemeProvider> </div> ); }