Skip to content

Commit

Permalink
add ref to revert to default label styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed Mar 8, 2024
1 parent 435f5c2 commit 2f6cf1e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface LabelActionIconProps {
}

const LabelActionIcon = React.forwardRef<SVGRectElement, LabelActionIconProps>(
({ icon, isIconExternal, onClick, className, x, y, paddingX, height, iconOffsetX = 0, iconOffsetY = 0 }) => {
({ icon, isIconExternal, onClick, className, x, y, paddingX, height, iconOffsetX = 0, iconOffsetY = 0 }, actionRef) => {
const [iconSize, iconRef] = useSize([icon, paddingX]);
const iconWidth = iconSize?.width ?? 0;
const iconHeight = iconSize?.height ?? 0;
Expand All @@ -42,6 +42,7 @@ const LabelActionIcon = React.forwardRef<SVGRectElement, LabelActionIconProps>(
<g className={classes} onClick={handleClick}>
{iconSize && (
<rect
ref={actionRef}
className={isIconExternal ? css(pipelineStyles.topologyPipelinesNodeActionIconBackground) : css(styles.topologyNodeActionIconBackground)}
x={x}
y={y}
Expand Down

0 comments on commit 2f6cf1e

Please sign in to comment.