-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase contrast for disabled items in the menu bar.
Fixes #10840.
- Loading branch information
Showing
9 changed files
with
99 additions
and
76 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
components/frontend/src/header_footer/buttons/AppBarbutton.jsx
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,35 @@ | ||
import { Button, Tooltip } from "@mui/material" | ||
import { grey } from "@mui/material/colors" | ||
import { bool, element, func, object, string } from "prop-types" | ||
|
||
import { childrenPropType } from "../../sharedPropTypes" | ||
|
||
export function AppBarButton({ children, disabled, loading, onClick, startIcon, sx, tooltip }) { | ||
return ( | ||
<Tooltip title={tooltip}> | ||
<span /* https://mui.com/material-ui/react-tooltip/#disabled-elements */> | ||
<Button | ||
aria-label={tooltip} | ||
color="inherit" | ||
disabled={disabled} | ||
loading={loading} | ||
loadingPosition="start" | ||
onClick={() => onClick()} | ||
startIcon={startIcon} | ||
sx={{ ...sx, height: "100%", "&:disabled": { color: grey[400] } }} | ||
> | ||
{children} | ||
</Button> | ||
</span> | ||
</Tooltip> | ||
) | ||
} | ||
AppBarButton.propTypes = { | ||
children: childrenPropType, | ||
disabled: bool, | ||
loading: bool, | ||
onClick: func, | ||
startIcon: element, | ||
sx: object, | ||
tooltip: string, | ||
} |
24 changes: 10 additions & 14 deletions
24
components/frontend/src/header_footer/buttons/CollapseButton.jsx
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
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
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
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
32 changes: 15 additions & 17 deletions
32
components/frontend/src/header_footer/buttons/HomeButton.jsx
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
31 changes: 13 additions & 18 deletions
31
components/frontend/src/header_footer/buttons/ResetSettingsButton.jsx
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
8 changes: 4 additions & 4 deletions
8
components/frontend/src/header_footer/buttons/SettingsButton.jsx
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
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