@@ -31,6 +31,7 @@ import { cn, getExtension } from "@/lib/utils";
31
31
32
32
import PortraitLandscape from "../shared/icons/portrait-landscape" ;
33
33
import LoadingSpinner from "../ui/loading-spinner" ;
34
+ import { ButtonTooltip } from "../ui/tooltip" ;
34
35
import { AddDocumentModal } from "./add-document-modal" ;
35
36
import { AddToDataroomModal } from "./add-document-to-dataroom-modal" ;
36
37
@@ -331,18 +332,20 @@ export default function DocumentHeader({
331
332
332
333
< div className = "flex items-center gap-x-4 md:gap-x-2 lg:gap-x-4" >
333
334
{ ! orientationLoading ? (
334
- < button
335
- className = "hidden md:flex"
336
- onClick = { changeDocumentOrientation }
337
- title = { `Change document orientation to ${ primaryVersion . isVertical ? "landscape" : "portrait" } ` }
338
- >
339
- < PortraitLandscape
340
- className = { cn (
341
- "h-6 w-6" ,
342
- ! primaryVersion . isVertical && "-rotate-90 transform" ,
343
- ) }
344
- />
345
- </ button >
335
+ < ButtonTooltip content = "Change orientation" >
336
+ < button
337
+ className = "hidden md:flex"
338
+ onClick = { changeDocumentOrientation }
339
+ title = { `Change document orientation to ${ primaryVersion . isVertical ? "landscape" : "portrait" } ` }
340
+ >
341
+ < PortraitLandscape
342
+ className = { cn (
343
+ "h-6 w-6" ,
344
+ ! primaryVersion . isVertical && "-rotate-90 transform" ,
345
+ ) }
346
+ />
347
+ </ button >
348
+ </ ButtonTooltip >
346
349
) : (
347
350
< div className = "hidden md:flex" >
348
351
< LoadingSpinner className = "h-6 w-6" />
@@ -351,9 +354,11 @@ export default function DocumentHeader({
351
354
352
355
{ primaryVersion . type !== "notion" && (
353
356
< AddDocumentModal newVersion >
354
- < button title = "Upload a new version" className = "hidden md:flex" >
355
- < FileUp className = "h-6 w-6" />
356
- </ button >
357
+ < ButtonTooltip content = "Add new version" >
358
+ < button title = "Upload a new version" className = "hidden md:flex" >
359
+ < FileUp className = "h-6 w-6" />
360
+ </ button >
361
+ </ ButtonTooltip >
357
362
</ AddDocumentModal >
358
363
) }
359
364
0 commit comments