article filter bar mobile responsive
This commit is contained in:
parent
0f7bf09676
commit
38b43174ec
@ -54,7 +54,7 @@ function ArticleFilterBar({
|
||||
<>
|
||||
<div
|
||||
className={cn(
|
||||
"flex w-full items-center justify-center gap-2 rounded-md border bg-background p-2",
|
||||
"flex w-full flex-col-reverse items-center justify-center gap-2 rounded-md border bg-background p-2 lg:flex-row lg:gap-4",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
@ -70,35 +70,37 @@ function ArticleFilterBar({
|
||||
placeholder="Artikel Suche..."
|
||||
/>
|
||||
</div>
|
||||
<CategorySelect
|
||||
className="w-full max-w-xs"
|
||||
onSelect={(category) => {
|
||||
onFilterChange({
|
||||
category: category?.length ? category : undefined,
|
||||
});
|
||||
}}
|
||||
buttonProps={{
|
||||
size: "sm",
|
||||
}}
|
||||
/>
|
||||
<Combobox
|
||||
hideSearch
|
||||
data={sortItems}
|
||||
initialValue={filter.sort}
|
||||
onSelect={(currentValue) => {
|
||||
onFilterChange({
|
||||
sort: currentValue?.length ? currentValue : undefined,
|
||||
});
|
||||
}}
|
||||
className="w-full max-w-64"
|
||||
messageUi={{
|
||||
selectIcon: FilterIcon,
|
||||
select: "Sortieren",
|
||||
}}
|
||||
buttonProps={{
|
||||
size: "sm",
|
||||
}}
|
||||
/>
|
||||
<div className="flex w-full flex-col gap-2 sm:flex-row">
|
||||
<CategorySelect
|
||||
className="w-full"
|
||||
onSelect={(category) => {
|
||||
onFilterChange({
|
||||
category: category?.length ? category : undefined,
|
||||
});
|
||||
}}
|
||||
buttonProps={{
|
||||
size: "sm",
|
||||
}}
|
||||
/>
|
||||
<Combobox
|
||||
hideSearch
|
||||
data={sortItems}
|
||||
initialValue={filter.sort}
|
||||
onSelect={(currentValue) => {
|
||||
onFilterChange({
|
||||
sort: currentValue?.length ? currentValue : undefined,
|
||||
});
|
||||
}}
|
||||
className="w-full"
|
||||
messageUi={{
|
||||
selectIcon: FilterIcon,
|
||||
select: "Sortieren",
|
||||
}}
|
||||
buttonProps={{
|
||||
size: "sm",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@ -121,9 +121,6 @@ export function Combobox({
|
||||
<div className="flex items-center gap-2">
|
||||
{item?.Icon && <item.Icon className="ml-auto opacity-50" />}
|
||||
<span>{item.label}</span>
|
||||
{/* <span className="text-xs text-muted-foreground">
|
||||
{value === item.value && "ausgewählt"}
|
||||
</span> */}
|
||||
</div>
|
||||
<Check
|
||||
className={cn(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user