Skip to content

Commit

Permalink
Improve the usability of the Popover
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Sep 18, 2024
1 parent ba12569 commit acef563
Showing 1 changed file with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const LabelFilterInput: React.FC<{
</PopoverTrigger>
<PopoverContent
align="start"
className="max-h-[300px] overflow-x-auto p-0 text-sm"
className="max-h-[300px] w-[23rem] overflow-auto p-0 text-sm"
onOpenAutoFocus={(e) => e.preventDefault()}
>
{filteredLabels.map((k) => (
Expand Down Expand Up @@ -200,24 +200,28 @@ export const UpsertLabelGroupDialog: React.FC<{
)}
</div>

<div className="flex items-center gap-2">
<LabelFilterInput
value={input}
workspaceId={workspaceId}
onChange={setInput}
/>
<Button
type="button"
variant="outline"
size="sm"
disabled={input === ""}
onClick={() => {
append({ value: input });
setInput("");
}}
>
Add Label
</Button>
<div className="flex items-center gap-3">
<div className="flex-grow">
<LabelFilterInput
value={input}
workspaceId={workspaceId}
onChange={setInput}
/>
</div>
<div className="ml-auto">
<Button
type="button"
variant="outline"
size="sm"
disabled={input === ""}
onClick={() => {
append({ value: input });
setInput("");
}}
>
Add Label
</Button>
</div>
</div>

<DialogFooter>
Expand Down

0 comments on commit acef563

Please sign in to comment.