add: filter switch controls
This commit is contained in:
+27
-6
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { MouseEventHandler, useCallback, useMemo, useState } from "react";
|
||||
import { useCallback, useMemo, useState } from "react";
|
||||
import SearchBox from "@/components/input/SearchBox";
|
||||
import CategoryItemRenderer from "@/components/listview/CategoryItemRenderer";
|
||||
import HorizontalScrollView from "@/components/listview/HorizontalScrollView";
|
||||
@@ -13,7 +13,10 @@ import React from "react";
|
||||
import MenuItem from "@/components/listview/MenuItem";
|
||||
import Button from "@/components/button/PrimaryButton";
|
||||
import AnimatedBottomSheet from "@/components/bottomsheet/AnimatedBottomSheet";
|
||||
import MultiOption, { DropdownOption } from "@/components/dropdown/MultiOption";
|
||||
import MultiOption from "@/components/combobox/MultiOption";
|
||||
import { DropdownOption } from "@/components/combobox/Combobox";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import MedalStarIcon from "@/components/icons/MedalStartIcon";
|
||||
|
||||
const categories = new Array(13).fill({ title: "خوراک", icon: "" });
|
||||
|
||||
@@ -132,7 +135,7 @@ const contents: Array<DropdownOption> = [
|
||||
]
|
||||
|
||||
const shippings: Array<DropdownOption> = [
|
||||
{ id: '0', title: 'ارسال با پیک' },
|
||||
{ id: '0', title: 'ارسال با پیک', label: '' },
|
||||
]
|
||||
|
||||
|
||||
@@ -141,7 +144,7 @@ const MenuIndex = () => {
|
||||
const [selectedCategory, setSelectedCategory] = useState(0);
|
||||
const [filterModal, setFilterModal] = useState(false);
|
||||
const [sortingModal, setSortingModal] = useState(false);
|
||||
const [sorting, setSorting] = useState(0);
|
||||
const [, setSorting] = useState(0);
|
||||
const [selectedContentId, setSelectedContentId] = useState('0');
|
||||
const [selectedShippingId, setSelectedShippingId] = useState('0');
|
||||
|
||||
@@ -243,9 +246,27 @@ const MenuIndex = () => {
|
||||
options={shippings}
|
||||
selectedId={selectedShippingId}
|
||||
onSelectionChange={changeSelectedShipping} />
|
||||
<div
|
||||
className="flex w-full mt-9.5 h-11 items-center justify-between gap-2 px-3 py-4 relative bg-white/29 rounded-xl border border-solid border-neutral-200 cursor-pointer focus:outline-none focus:ring-2 focus:ring-black"
|
||||
>
|
||||
<span>
|
||||
<MedalStarIcon />
|
||||
دارای امتیاز پس از خرید
|
||||
</span>
|
||||
<Switch className="w-12 h-6" />
|
||||
</div>
|
||||
<div
|
||||
className="flex w-full mt-9.5 h-11 items-center justify-between gap-2 px-3 py-4 relative bg-white/29 rounded-xl border border-solid border-neutral-200 cursor-pointer focus:outline-none focus:ring-2 focus:ring-black"
|
||||
>
|
||||
<span>
|
||||
<MedalStarIcon />
|
||||
دارای کد تخفیف
|
||||
</span>
|
||||
<Switch />
|
||||
</div>
|
||||
</div>
|
||||
<div className="px-9 pt-13 flex justify-between gap-[22px]">
|
||||
<hr className="text-white/40 mb-7 mt-12" />
|
||||
<hr className="text-white/40 mt-12" />
|
||||
<div className="px-9 pt-6 flex justify-between gap-[22px]">
|
||||
<div className="w-full">
|
||||
<Button>اعمال فیلتر</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user