Skip to content

Commit

Permalink
fix: Toggle button visual order (#4128)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s authored Jan 9, 2025
1 parent 10a746e commit c9412ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions editor.planx.uk/src/ui/editor/ToggleIconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ const ToggleIconButton: React.FC<ToggleIconButtonProps> = ({
<Tooltip title={tooltip} placement="right">
<IconButton
aria-label={ariaLabel}
aria-pressed={isToggled}
onClick={onToggle}
size="large"
sx={(theme) => ({
position: "relative",
background: theme.palette.background.paper,
padding: theme.spacing(1),
color: isToggled
? theme.palette.text.disabled
: theme.palette.text.primary,
? theme.palette.text.primary
: theme.palette.text.disabled,

"&:hover": {
background: theme.palette.common.white,
Expand All @@ -45,7 +46,7 @@ const ToggleIconButton: React.FC<ToggleIconButtonProps> = ({
top: "55%",
left: "48%",
transform: "translate(-50%, -50%)",
opacity: isToggled ? 1 : 0,
opacity: isToggled ? 0 : 1,
transition: "opacity 0.2s ease-in-out",
}}
>
Expand Down

0 comments on commit c9412ae

Please sign in to comment.