Skip to content

Commit

Permalink
fix: Fix hover for disabled buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
r8 committed Aug 12, 2023
1 parent dccbcef commit 668d248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/toolbar/toolbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ToolbarButton = (props: React.PropsWithChildren<ToolbarButtonProps>) => {
width: buttonSize,
height: buttonSize,
backgroundColor: theme.buttonBackgroundColor,
filter: isHover ? "brightness(80%)" : null,
filter: !disabled && isHover ? "brightness(80%)" : null,
borderRadius: buttonSize / 5,
display: "flex",
alignItems: "center",
Expand All @@ -49,8 +49,8 @@ const ToolbarButton = (props: React.PropsWithChildren<ToolbarButtonProps>) => {
<button
style={buttonStyle}
onClick={!disabled && onClick}
onMouseEnter={!disabled && handleMouseEnter}
onMouseLeave={!disabled && handleMouseLeave}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
{React.Children.map(children, (child: ReactElement) => {
return React.cloneElement(child, {
Expand Down

0 comments on commit 668d248

Please # to comment.