Skip to content

Commit

Permalink
[material-ui][ToggleButtonGroup] Add missing selected class in Togg…
Browse files Browse the repository at this point in the history
…leButtonGroupClasses type (@tarunrajput) (#42250)

Co-authored-by: Tarun Chauhan <[email protected]>
Co-authored-by: ZeeshanTamboli <[email protected]>
  • Loading branch information
3 people authored May 15, 2024
1 parent ce4dec4 commit cb590e4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
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

0 comments on commit cb590e4

Please sign in to comment.