fix(client): subtle tinted selection on toggle button group

Selected segment uses a 6% primary alpha rather than the previous green tint, and the per-button border override is gone so adjacent segments share one clean divider line.
This commit is contained in:
gorkem-bwl committed 2026-04-26 00:42:11 -04:00
1 parent 51f9c09132
commit cca027b5eb
1 file changed
+12 -1
+12 -1
View File
@@ -3,8 +3,10 @@ import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
import type { ToggleButtonProps } from "@mui/material/ToggleButton";
import type { ToggleButtonGroupProps } from "@mui/material/ToggleButtonGroup";
import { useTheme } from "@mui/material/styles";
import { alpha } from "@mui/material/styles";
export const ToggleButtonInput = ({ sx, ...props }: ToggleButtonProps) => {
const theme = useTheme();
return (
<ToggleButton
{...props}
@@ -17,8 +19,18 @@ export const ToggleButtonInput = ({ sx, ...props }: ToggleButtonProps) => {
textOverflow: "ellipsis",
overflow: "hidden",
boxShadow: "none",
color: theme.palette.text.secondary,
"&:hover": {
boxShadow: "none",
backgroundColor: theme.palette.action.hover,
},
"&.Mui-selected": {
backgroundColor: alpha(theme.palette.primary.main, 0.06),
color: theme.palette.text.primary,
fontWeight: 500,
"&:hover": {
backgroundColor: alpha(theme.palette.primary.main, 0.1),
},
},
...sx,
}}
@@ -34,7 +46,6 @@ export const ToggleButtonGroupInput = ({ sx, ...props }: ToggleButtonGroupProps)
sx={{
"& .MuiToggleButtonGroup-grouped": {
borderColor: theme.palette.divider,
borderRadius: 0,
"&:first-of-type": {
borderTopLeftRadius: 2,