forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ButtonGroup] Should not retain divider color when it is disabled and…
… variant is `text` (mui#36967) Co-authored-by: FeCurtain <[email protected]> Co-authored-by: ZeeshanTamboli <[email protected]>
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
test/regressions/fixtures/ButtonGroup/DisabledButtonGroup.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as React from 'react'; | ||
import Button from '@mui/material/Button'; | ||
import Box from '@mui/material/Box'; | ||
import ButtonGroup from '@mui/material/ButtonGroup'; | ||
|
||
const buttons = [ | ||
<Button key="one">One</Button>, | ||
<Button key="two">Two</Button>, | ||
<Button key="three">Three</Button>, | ||
]; | ||
|
||
export default function DisabledButtonGroup() { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
'& > *': { | ||
m: 1, | ||
}, | ||
}} | ||
> | ||
{/* variant="text" */} | ||
<ButtonGroup | ||
color="error" | ||
orientation="horizontal" | ||
aria-label="horizontal text button group" | ||
variant="text" | ||
disabled | ||
> | ||
{buttons} | ||
</ButtonGroup> | ||
{/* variant="text" */} | ||
<ButtonGroup | ||
color="error" | ||
orientation="vertical" | ||
aria-label="vertical text button group" | ||
variant="text" | ||
disabled | ||
> | ||
{buttons} | ||
</ButtonGroup> | ||
</Box> | ||
); | ||
} |