[WEB-872] chore: add tooltip to peek overview header icons. (#4229)

This commit is contained in:
Prateek Shourya 2024-04-23 12:49:29 +05:30 committed by GitHub
parent c1e5c0d4eb
commit 38daf72361
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,22 +112,28 @@ export const IssuePeekOverviewHeader: FC<PeekOverviewHeaderProps> = observer((pr
}`} }`}
> >
<div className="flex items-center gap-4"> <div className="flex items-center gap-4">
<button onClick={removeRoutePeekId}> <Tooltip tooltipContent="Close the peek view" isMobile={isMobile}>
<MoveRight className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" /> <button onClick={removeRoutePeekId}>
</button> <MoveRight className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" />
</button>
</Tooltip>
<Link href={`/${issueLink}`} onClick={() => removeRoutePeekId()}> <Tooltip tooltipContent="Open issue in full screen" isMobile={isMobile}>
<MoveDiagonal className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" /> <Link href={`/${issueLink}`} onClick={() => removeRoutePeekId()}>
</Link> <MoveDiagonal className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" />
</Link>
</Tooltip>
{currentMode && ( {currentMode && (
<div className="flex flex-shrink-0 items-center gap-2"> <div className="flex flex-shrink-0 items-center gap-2">
<CustomSelect <CustomSelect
value={currentMode} value={currentMode}
onChange={(val: any) => setPeekMode(val)} onChange={(val: any) => setPeekMode(val)}
customButton={ customButton={
<button type="button" className=""> <Tooltip tooltipContent="Toggle peek view layout" isMobile={isMobile}>
<currentMode.icon className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" /> <button type="button" className="">
</button> <currentMode.icon className="h-4 w-4 text-custom-text-300 hover:text-custom-text-200" />
</button>
</Tooltip>
} }
> >
{PEEK_OPTIONS.map((mode) => ( {PEEK_OPTIONS.map((mode) => (