Skip to content

Commit 28acf86

Browse files
Fix bookmark button on mobile (#2400)
1 parent d450527 commit 28acf86

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

components/Library/index.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ export default function Library({
5252
skipSecondaryMetadata && tw`min-h-0`,
5353
library.unmaintained && tw`opacity-85`,
5454
]}>
55-
<BookmarkButton
56-
bookmarkId={libName}
57-
style={tw`absolute right-2.5 top-2.5 z-10 rounded border border-palette-gray2 p-1.5 dark:border-palette-gray6`}
58-
/>
55+
{!isSmallScreen && (
56+
<BookmarkButton
57+
bookmarkId={libName}
58+
style={tw`absolute right-2.5 top-2.5 z-10 rounded border border-palette-gray2 p-1.5 dark:border-palette-gray6`}
59+
/>
60+
)}
5961
<View
6062
style={[
6163
tw`flex-1 p-4 pb-3 pl-5`,
@@ -85,7 +87,7 @@ export default function Library({
8587
<View
8688
style={
8789
isSmallScreen
88-
? tw`flex-col justify-start gap-2 self-start`
90+
? tw`w-full flex-col justify-start gap-2 self-start`
8991
: tw`flex-row items-start justify-between gap-6`
9092
}>
9193
<View style={tw`flex-row items-center gap-1.5`}>
@@ -104,6 +106,12 @@ export default function Library({
104106
/>
105107
</A>
106108
</HoverEffect>
109+
{isSmallScreen && (
110+
<BookmarkButton
111+
bookmarkId={libName}
112+
style={tw`-mr-1 ml-auto rounded border border-palette-gray2 p-1.5 dark:border-palette-gray6`}
113+
/>
114+
)}
107115
</View>
108116
{!showTrendingMark && !skipDate && !library.unmaintained && (
109117
<UpdatedAtView library={library} />

0 commit comments

Comments
 (0)