/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/mui-material/src/ButtonGroup/buttonGroupClasses.ts
61 строка
2 KB
Siriwat K
[ButtonGroup] Remove deprecated classes (#48043)
20 мар 2026, 17:55
Не верифицирован
20 мар 2026, 17:55
85da9bb
Код
Авторство
О чём код?
import generateUtilityClasses from '@mui/utils/generateUtilityClasses'; import generateUtilityClass from '@mui/utils/generateUtilityClass'; export interface ButtonGroupClasses { /** Styles applied to the root element. */ root: string; /** Styles applied to the root element if `variant="contained"`. */ contained: string; /** Styles applied to the root element if `variant="outlined"`. */ outlined: string; /** Styles applied to the root element if `variant="text"`. */ text: string; /** Styles applied to the root element if `disableElevation={true}`. */ disableElevation: string; /** State class applied to the child elements if `disabled={true}`. */ disabled: string; /** Styles applied to the first button in the button group. */ firstButton: string; /** Styles applied to the root element if `fullWidth={true}`. */ fullWidth: string; /** Styles applied to the root element if `orientation="horizontal"`. */ horizontal: string; /** Styles applied to the root element if `orientation="vertical"`. */ vertical: string; /** Styles applied to the children. */ grouped: string; /** Styles applied to the root element if `color="primary"` */ colorPrimary: string; /** Styles applied to the root element if `color="secondary"` */ colorSecondary: string; /** Styles applied to the last button in the button group. */ lastButton: string; /** Styles applied to buttons in the middle of the button group. */ middleButton: string; } export type ButtonGroupClassKey = keyof ButtonGroupClasses; export function getButtonGroupUtilityClass(slot: string): string { return generateUtilityClass('MuiButtonGroup', slot); } const buttonGroupClasses: ButtonGroupClasses = generateUtilityClasses('MuiButtonGroup', [ 'root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'firstButton', 'fullWidth', 'horizontal', 'vertical', 'colorPrimary', 'colorSecondary', 'grouped', 'lastButton', 'middleButton', ]); export default buttonGroupClasses;