Skip to content

Commit 974f8e1

Browse files
authored
Merge pull request #28 from pheuberger/claude/inline-tags-list-view-fNTjv
Refactor bookmark tags layout and styling
2 parents ab9bc1e + fd39901 commit 974f8e1

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

src/components/bookmarks/BookmarkItem.jsx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,25 @@ export const BookmarkItem = forwardRef(function BookmarkItem(
7575
{title}
7676
</a>
7777
<span className="text-xs text-muted-foreground truncate flex-shrink-0 font-normal">{domain}</span>
78+
{tags && tags.length > 0 && (
79+
<div className="flex items-center gap-1.5 flex-shrink-0">
80+
{tags.map((tag) => (
81+
<span
82+
key={tag}
83+
onClick={(e) => {
84+
e.stopPropagation()
85+
if (!selectionMode) {
86+
onTagClick && onTagClick(tag)
87+
}
88+
}}
89+
className="text-[10px] leading-none px-2 py-1 rounded-full bg-secondary text-secondary-foreground hover:text-primary hover:bg-accent cursor-pointer transition-colors font-medium"
90+
>
91+
{tag}
92+
</span>
93+
))}
94+
</div>
95+
)}
7896
</div>
79-
80-
{tags && tags.length > 0 && (
81-
<div className="flex gap-1.5 mt-1">
82-
{tags.map((tag) => (
83-
<span
84-
key={tag}
85-
onClick={(e) => {
86-
e.stopPropagation()
87-
if (!selectionMode) {
88-
onTagClick && onTagClick(tag)
89-
}
90-
}}
91-
className="text-[10px] leading-tight px-1.5 py-0.5 rounded-[3px] bg-secondary text-secondary-foreground hover:text-primary hover:bg-accent cursor-pointer transition-colors"
92-
>
93-
#{tag}
94-
</span>
95-
))}
96-
</div>
97-
)}
9897
</div>
9998

10099
{!selectionMode && (

0 commit comments

Comments
 (0)