Skip to content

Commit

Permalink
add cursor style to FE icons
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Feb 13, 2024
1 parent 9132c6a commit 81f9603
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type FileHoverIconsProps = {
}

export function FileHoverIcons(props: FileHoverIconsProps) {

const [mouseOver, setMouseOver] = useState(false)
return (
<>
{<div className="d-flex flex-row align-items-center">
Expand All @@ -32,6 +32,9 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
e.stopPropagation()
await props.handleNewFolderOp(props.file.path)
}}
style={{ cursor: mouseOver ? 'pointer' : 'default' }}
onMouseEnter={(e) => setMouseOver(true)}
onMouseLeave={(e) => setMouseOver(false)}
></span>
</CustomTooltip>
<CustomTooltip
Expand All @@ -47,6 +50,9 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
e.stopPropagation()
await props.handleNewFileOp(props.file.path)
}}
style={{ cursor: mouseOver ? 'pointer' : 'default' }}
onMouseEnter={(e) => setMouseOver(true)}
onMouseLeave={(e) => setMouseOver(false)}
></span>
</CustomTooltip>
</>
Expand All @@ -65,6 +71,9 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
e.stopPropagation()
await props.renamePathOp(props.file.path, props.file.type)
}}
style={{ cursor: mouseOver ? 'pointer' : 'default' }}
onMouseEnter={(e) => setMouseOver(true)}
onMouseLeave={(e) => setMouseOver(false)}
></span>
</CustomTooltip>
<CustomTooltip
Expand All @@ -80,6 +89,9 @@ export function FileHoverIcons(props: FileHoverIconsProps) {
e.stopPropagation()
await props.deletePathOp(props.file.path)
}}
style={{ cursor: mouseOver ? 'pointer' : 'default' }}
onMouseEnter={(e) => setMouseOver(true)}
onMouseLeave={(e) => setMouseOver(false)}
></span>
</CustomTooltip>
</div>
Expand Down

0 comments on commit 81f9603

Please sign in to comment.