summaryrefslogtreecommitdiff
path: root/src/components/Filter.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Filter.js')
-rw-r--r--src/components/Filter.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/components/Filter.js b/src/components/Filter.js
index 92a28e09..f2051ba8 100644
--- a/src/components/Filter.js
+++ b/src/components/Filter.js
@@ -1,6 +1,6 @@
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
-import CloseIcon from "../icons/close.svg";
+import BottomPopup from "./BottomPopup";
const Filter = ({
isActive,
@@ -104,14 +104,7 @@ const Filter = ({
return (
<>
- <div className={"menu-overlay " + (isActive ? 'block' : 'hidden')} onClick={closeFilter} />
- <div className={`fixed w-full z-[60] py-6 px-4 bg-white rounded-t-3xl idt-transition ${isActive ? 'bottom-0' : 'bottom-[-100%]'}`}>
- <div className="flex justify-between items-center mb-5">
- <h2 className="text-xl font-semibold">Filter Produk</h2>
- <button onClick={closeFilter}>
- <CloseIcon className="w-7" />
- </button>
- </div>
+ <BottomPopup active={isActive} closePopup={closeFilter} title="Filter Produk">
<form className="flex flex-col gap-y-4" onSubmit={submit}>
{(selectedBrand || selectedCategory || priceFrom || priceTo || orderBy) && (
<button type="button" className="text-yellow_r-11 font-semibold ml-auto" onClick={reset}>
@@ -175,7 +168,7 @@ const Filter = ({
Terapkan Filter
</button>
</form>
- </div>
+ </BottomPopup>
</>
)
};