Skip to content

Commit 5d1e75b

Browse files
hichemfantardimaMachina
andauthoredJan 29, 2025··
Implement back to top fade in and out transitions (#4093)
* fade in and out * Update back-to-top.tsx * Update toc.tsx * Create new-years-sit.md --------- Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
1 parent 2b0b434 commit 5d1e75b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎.changeset/new-years-sit.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"nextra-theme-docs": patch
3+
---
4+
5+
add the missing `transition-opacity` style for the `<BackToTop>` component

‎packages/nextra-theme-docs/src/components/back-to-top.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const BackToTop: FC<{
3030
disabled={hidden}
3131
className={({ disabled }) =>
3232
cn(
33-
'x:flex x:items-center x:gap-1.5 x:cursor-pointer',
33+
'x:flex x:items-center x:gap-1.5 x:cursor-pointer x:transition-opacity',
3434
'x:whitespace-nowrap', // Safari
3535
disabled ? 'x:opacity-0' : 'x:opacity-100',
3636
className

0 commit comments

Comments
 (0)
Please sign in to comment.