diff --git a/src/components/GitNode.tsx b/src/components/GitNode.tsx index 9e962045c..3924d06ac 100644 --- a/src/components/GitNode.tsx +++ b/src/components/GitNode.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import React, { useState } from 'react'; import { Handle, NodeProps, Position } from 'react-flow-renderer'; import { ColorSet } from '../containers/colors'; -import { OutlinedCard } from './GitGraphBranchTag'; +import { OutlinedCard } from './GitGraphTag'; const customNodeStyles = (color: ColorSet, border: string, opacity?: string) => ({ borderRadius: '50%', @@ -25,10 +25,15 @@ type GitNodeProps = NodeProps & { } export const GitNode: React.FunctionComponent = props => { + const [isHovering, setIsHovering] = useState(false); + return ( <> { props.data.branch ? : null} -
+ { isHovering ? : null} +
setIsHovering(true)} onMouseLeave={() => setIsHovering(false)} + >
{props.data.text}