Skip to content

Commit

Permalink
Update bar opacity and add cursor pointer to bar tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Feb 23, 2024
1 parent a8fa15d commit 61be627
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions CommonUI/src/Components/GanttChart/Bar/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ const Bar: FunctionComponent<ComponentProps> = (
setIsHovered(false);
};

let barOpacity: number = 1;
let barOpacity: number = 0.9;

if (props.areOtherBarsSelected && !isSelected) {
barOpacity = 0.5;
}


if(isHovered){
barOpacity = 1;
}

return (
// rectangle div with curved corners and text inside in tailwindcss
<div
Expand Down Expand Up @@ -106,7 +111,7 @@ const Bar: FunctionComponent<ComponentProps> = (
/>
)}
{isHovered && props.bar.tooltip && (
<div className="bar-tooltip bg-white shadow rounded p-2 w-fit z-40 absolute">
<div className="bar-tooltip cursor-pointer bg-white shadow rounded p-2 w-fit z-40 absolute">
{props.bar.tooltip}
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const TraceView: FunctionComponent<PageComponentProps> = (
} = data;

return (
<div className="px-1 min-w-56">
<div className="px-1 min-w-56 cursor-default">
<div className="bar-tooltip-title text-sm text-gray-700 font-medium my-2">
{span.name}
</div>
Expand Down

0 comments on commit 61be627

Please sign in to comment.