/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/data/material/components/badges/BadgeMax.js
26 строк
829 B
Albert Yu
[badge] Add `aria-hidden` to badge content and polish docs demos (#48471)
03 июн 2026, 15:57
Не верифицирован
03 июн 2026, 15:57
49aade9
Код
Авторство
О чём код?
import Stack from '@mui/material/Stack'; import Badge from '@mui/material/Badge'; import IconButton from '@mui/material/IconButton'; import MailIcon from '@mui/icons-material/Mail'; export default function BadgeMax() { return ( <Stack spacing={2} direction="row"> <IconButton aria-label="show 99 unread messages"> <Badge color="secondary" badgeContent={99}> <MailIcon /> </Badge> </IconButton> <IconButton aria-label="show more than 99 unread messages"> <Badge color="secondary" badgeContent={100}> <MailIcon /> </Badge> </IconButton> <IconButton aria-label="show more than 999 unread messages"> <Badge color="secondary" badgeContent={1000} max={999}> <MailIcon /> </Badge> </IconButton> </Stack> ); }