From 6b4371c096030354f09465e3773200529cf727d1 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Sat, 21 Jan 2023 08:19:56 +0700 Subject: Detail transaction list --- src/components/BottomPopup.js | 25 +++++++++++++++++++++++++ src/components/Filter.js | 13 +++---------- src/components/Layout.js | 4 ++-- 3 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 src/components/BottomPopup.js (limited to 'src/components') diff --git a/src/components/BottomPopup.js b/src/components/BottomPopup.js new file mode 100644 index 00000000..b7f5f2de --- /dev/null +++ b/src/components/BottomPopup.js @@ -0,0 +1,25 @@ +import CloseIcon from "../icons/close.svg"; + +const BottomPopup = ({ + active = false, + title, + children, + closePopup = () => {} +}) => { + return ( + <> +
+
+
+

{ title }

+ +
+ { children } +
+ + ); +}; + +export default BottomPopup; \ No newline at end of file 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 ( <> -
-
-
-

Filter Produk

- -
+
{(selectedBrand || selectedCategory || priceFrom || priceTo || orderBy) && (
-
+ ) }; diff --git a/src/components/Layout.js b/src/components/Layout.js index 24017c03..fd507963 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -8,9 +8,9 @@ export default function Layout({ children, ...pageProps }) { return children && ( -- cgit v1.2.3