Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][ToggleButtonGroup] Add missing selected class in ToggleButtonGroupClasses type (@tarunrajput) #42250

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/pages/material-ui/api/toggle-button-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
"description": "Styles applied to the children if `orientation=\"vertical\"`.",
"isGlobal": false
},
{
"key": "horizontal",
"className": "MuiToggleButtonGroup-horizontal",
"description": "Styles applied to the root element if `orientation=\"horizontal\"`.",
"isGlobal": false
},
{
"key": "lastButton",
"className": "MuiToggleButtonGroup-lastButton",
Expand All @@ -99,6 +105,12 @@
"description": "Styles applied to the root element.",
"isGlobal": false
},
{
"key": "selected",
"className": "Mui-selected",
"description": "State class applied to the root element if `selected={true}`.",
"isGlobal": true
},
{
"key": "vertical",
"className": "MuiToggleButtonGroup-vertical",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"nodeName": "the children",
"conditions": "<code>orientation=\"vertical\"</code>"
},
"horizontal": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>orientation=\"horizontal\"</code>"
},
"lastButton": {
"description": "Styles applied to {{nodeName}}.",
"nodeName": "the last button in the toggle button group"
Expand All @@ -66,6 +71,11 @@
"nodeName": "buttons in the middle of the toggle button group"
},
"root": { "description": "Styles applied to the root element." },
"selected": {
"description": "State class applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>selected={true}</code>"
},
"vertical": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
export interface ToggleButtonGroupClasses {
/** Styles applied to the root element. */
root: string;
/** State class applied to the root element if `selected={true}`. */
selected: string;
/** Styles applied to the root element if `orientation="horizontal"`. */
horizontal: string;
/** Styles applied to the root element if `orientation="vertical"`. */
vertical: string;
/** State class applied to the root element if `disabled={true}`. */
Expand Down Expand Up @@ -35,6 +39,7 @@ const toggleButtonGroupClasses: ToggleButtonGroupClasses = generateUtilityClasse
[
'root',
'selected',
'horizontal',
'vertical',
'disabled',
'grouped',
Expand Down
Loading