Skip to content

Commit bc34455

Browse files
committed
chore: show all tags on TaggablePopover
1 parent 9fa0066 commit bc34455

File tree

1 file changed

+14
-29
lines changed

1 file changed

+14
-29
lines changed

src/components/TaggablePopover.tsx

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -121,40 +121,25 @@ export const TaggablePopover = ({
121121
<Button
122122
variant="outline"
123123
size="sm"
124-
className="my-4 h-8 border-dashed dark:border-2"
124+
className="my-4 h-auto min-h-8 border-dashed dark:border-2"
125125
>
126-
<PlusCircledIcon className="mr-2 h-4 w-4" />
126+
<PlusCircledIcon className="mr-2 h-4 w-4 shrink-0" />
127127
Tags
128128
{selectedTags?.length > 0 && (
129129
<>
130130
<Separator orientation="vertical" className="mx-2 h-4" />
131-
<Badge
132-
color="secondary"
133-
className="rounded-sm px-1 font-normal lg:hidden"
134-
>
135-
{selectedTags.length}
136-
</Badge>
137-
<div className="hidden space-x-1 lg:flex">
138-
{selectedTags.length > 2 ? (
139-
<Badge
140-
color="secondary"
141-
className="rounded-sm px-1 font-normal"
142-
>
143-
{selectedTags.length} tags
144-
</Badge>
145-
) : (
146-
tags
147-
.filter((option) => selectedTags.includes(option.value))
148-
.map((option) => (
149-
<Badge
150-
color="secondary"
151-
key={option.value}
152-
className="rounded-sm px-1 font-normal"
153-
>
154-
{option.label}
155-
</Badge>
156-
))
157-
)}
131+
<div className="flex max-w-xs flex-wrap gap-1 py-4">
132+
{tags
133+
.filter((option) => selectedTags.includes(option.value))
134+
.map((option) => (
135+
<Badge
136+
color="secondary"
137+
key={option.value}
138+
className="rounded-sm px-1 font-normal"
139+
>
140+
{option.label}
141+
</Badge>
142+
))}
158143
</div>
159144
</>
160145
)}

0 commit comments

Comments
 (0)