Skip to content

Commit 75b8efa

Browse files
Remove sticky prop on Updates block (#3832)
1 parent 34b0c67 commit 75b8efa

File tree

1 file changed

+2
-5
lines changed
  • packages/gitbook/src/components/DocumentView

1 file changed

+2
-5
lines changed

packages/gitbook/src/components/DocumentView/Update.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export function Update(props: BlockProps<DocumentBlockUpdate>) {
3535
short: formatDateShort(parsedDate),
3636
}[dateFormat];
3737

38-
const isSticky = parentUpdates.data.sticky;
39-
4038
return (
4139
<div
4240
className={tcls(
@@ -46,9 +44,8 @@ export function Update(props: BlockProps<DocumentBlockUpdate>) {
4644
>
4745
<div
4846
className={tcls(
49-
'h-fit w-40 min-w-40 shrink-0',
50-
// Date is sticky on larger screens & if enabled on the parent Updates block
51-
isSticky && 'md:sticky md:top-[calc(var(--toc-top-offset)+8px)]!'
47+
// Date is only sticky on larger screens when we use flex-row layout
48+
'h-fit w-40 min-w-40 shrink-0 md:sticky md:top-[calc(var(--toc-top-offset)+8px)]!'
5249
)}
5350
>
5451
<time

0 commit comments

Comments
 (0)