testing
This commit is contained in:
parent
b6a0579de7
commit
fb938204d4
@ -72,49 +72,35 @@ function CommandSearch() {
|
|||||||
</Button>
|
</Button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="z-modal+ w-auto p-0" align="start">
|
<PopoverContent className="z-modal+ w-auto p-0" align="start">
|
||||||
<Command className="rounded-lg border shadow-md">
|
<div className="rounded-lg border shadow-md">
|
||||||
<CommandInput disabled={!ready} placeholder="Search places..." />
|
|
||||||
<Input
|
<Input
|
||||||
className="border-0 px-0 shadow-none focus-visible:ring-0"
|
className="border-0 shadow-none focus-visible:ring-0"
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(e) => setValue(e.target.value)}
|
onChange={(e) => setValue(e.target.value)}
|
||||||
placeholder="Search places..."
|
placeholder="Search places..."
|
||||||
disabled={!ready}
|
disabled={!ready}
|
||||||
/>
|
/>
|
||||||
<CommandList>
|
<ul className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden")}>
|
||||||
<CommandEmpty>No results found.</CommandEmpty>
|
|
||||||
<CommandGroup heading="Suggestions">
|
|
||||||
{data.map(
|
{data.map(
|
||||||
({
|
({
|
||||||
description,
|
description,
|
||||||
place_id,
|
place_id,
|
||||||
structured_formatting: { main_text, secondary_text },
|
structured_formatting: { main_text, secondary_text },
|
||||||
}) => (
|
}) => (
|
||||||
<CommandItem key={place_id}>
|
<li
|
||||||
|
key={place_id}
|
||||||
|
className={cn(
|
||||||
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
|
)}
|
||||||
|
>
|
||||||
<HiOutlineBuildingStorefront className="mr-2 h-4 w-4" />
|
<HiOutlineBuildingStorefront className="mr-2 h-4 w-4" />
|
||||||
<span>{main_text}</span>
|
<span>{main_text}</span>
|
||||||
<span>{description}</span>
|
<span>{description}</span>
|
||||||
</CommandItem>
|
</li>
|
||||||
),
|
),
|
||||||
)}
|
)}
|
||||||
</CommandGroup>
|
</ul>
|
||||||
<CommandSeparator />
|
</div>
|
||||||
<CommandGroup heading="Vitrual">
|
|
||||||
<CommandItem>
|
|
||||||
<HiOutlineBuildingStorefront className="mr-2 h-4 w-4" />
|
|
||||||
<span>Profile</span>
|
|
||||||
</CommandItem>
|
|
||||||
<CommandItem>
|
|
||||||
<HiOutlineBuildingStorefront className="mr-2 h-4 w-4" />
|
|
||||||
<span>Mail</span>
|
|
||||||
</CommandItem>
|
|
||||||
<CommandItem>
|
|
||||||
<HiOutlineBuildingStorefront className="mr-2 h-4 w-4" />
|
|
||||||
<span>Settings</span>
|
|
||||||
</CommandItem>
|
|
||||||
</CommandGroup>
|
|
||||||
</CommandList>
|
|
||||||
</Command>
|
|
||||||
</PopoverContent>
|
</PopoverContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user