/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/mui-material/src/Alert/alertClasses.ts
49 строк
1 KB
Silviu Alexandru Avram
[alert] Remove deprecated classes (#48011)
19 мар 2026, 12:52
Не верифицирован
19 мар 2026, 12:52
e2e86ef
Код
Авторство
О чём код?
import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; export interface AlertClasses { /** Styles applied to the root element. */ root: string; /** Styles applied to the root element if `variant="filled"`. */ filled: string; /** Styles applied to the root element if `variant="outlined"`. */ outlined: string; /** Styles applied to the root element if `variant="standard"`. */ standard: string; /** Styles applied to the root element if `color="success"`. */ colorSuccess: string; /** Styles applied to the root element if `color="info"`. */ colorInfo: string; /** Styles applied to the root element if `color="warning"`. */ colorWarning: string; /** Styles applied to the root element if `color="error"`. */ colorError: string; /** Styles applied to the icon wrapper element. */ icon: string; /** Styles applied to the message wrapper element. */ message: string; /** Styles applied to the action wrapper element if `action` is provided. */ action: string; } export type AlertClassKey = keyof AlertClasses; export function getAlertUtilityClass(slot: string): string { return generateUtilityClass('MuiAlert', slot); } const alertClasses: AlertClasses = generateUtilityClasses('MuiAlert', [ 'root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'outlined', 'standard', ]); export default alertClasses;