Skip to content

Commit

Permalink
feat(Canvas): Use hover styles upon open toolbar
Browse files Browse the repository at this point in the history
Currently, when opening the step toolbar upon hovering a node or a
group, the hover style is lost when hovering over the toolbar.

This commit retains the hover styling when the toolbar is open.
  • Loading branch information
lordrip committed Nov 18, 2024
1 parent 9ee3368 commit 0997110
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
}

&:hover,
[data-toolbar-open='true'] &,
[data-selected='true'] & {
border-color: var(--custom-node-hover-BorderColor);
box-shadow: var(--custom-node-Shadow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const CustomGroupExpanded: FunctionComponent<CustomGroupProps> = observer
data-grouplabel={label}
data-selected={isSelected}
data-disabled={isDisabled}
data-toolbar-open={shouldShowToolbar}
onClick={onSelect}
onContextMenu={onContextMenu}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}

&:hover &__image,
[data-toolbar-open='true'] & &__image,
[data-selected='true'] & &__image {
border-color: var(--custom-node-hover-BorderColor);
box-shadow: var(--custom-node-Shadow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const CustomNode: FunctionComponent<CustomNodeProps> = observer(({ element, onCo
data-nodelabel={label}
data-selected={isSelected}
data-disabled={isDisabled}
data-toolbar-open={shouldShowToolbar}
data-warning={doesHaveWarnings}
onClick={onSelect}
onContextMenu={onContextMenu}
Expand Down

0 comments on commit 0997110

Please sign in to comment.