diff --git a/src/app/[name]/page.tsx b/src/app/[name]/page.tsx index 0078d48..5411724 100644 --- a/src/app/[name]/page.tsx +++ b/src/app/[name]/page.tsx @@ -11,10 +11,9 @@ import VerticalScrollView from "@/components/listview/VerticalScrollView"; import MenuItemRenderer from "@/components/listview/MenuItemRenderer"; import React from "react"; import MenuItem from "@/components/listview/MenuItem"; -import BlurredOverlayContainer from "@/components/overlays/BlurredOverlayContainer"; import CloseIcon from "@/components/icons/CloseIcon"; -import clsx from "clsx"; import Button from "@/components/button/PrimaryButton"; +import AnimatedBottomSheet from "@/components/bottomsheet/AnimatedBottomSheet"; const categories = new Array(13).fill({ title: "خوراک", icon: "" }); @@ -194,31 +193,23 @@ const MenuIndex = () => { - -
-
-
فیلتر ها
-
- -
-
- -
-
-
- -
-
- -
+ +
+
فیلتر ها
+
+
- +
+
+
+ +
+
+ +
+
+
); }; diff --git a/src/components/bottomsheet/AnimatedBottomSheet.tsx b/src/components/bottomsheet/AnimatedBottomSheet.tsx new file mode 100644 index 0000000..0edda7e --- /dev/null +++ b/src/components/bottomsheet/AnimatedBottomSheet.tsx @@ -0,0 +1,32 @@ +import React from 'react' +import BlurredOverlayContainer, { BlurredOverlayContainerProps } from '../overlays/BlurredOverlayContainer' +import clsx from 'clsx' +import CloseIcon from '../icons/CloseIcon' + +type Props = { + title: string +} & BlurredOverlayContainerProps + +const AnimatedBottomSheet = (props: Props) => { + return ( + +
+
+
{props.title}
+
+ +
+
+ {props.children} +
+ +
+ ) +} + +export default AnimatedBottomSheet \ No newline at end of file diff --git a/src/components/overlays/BlurredOverlayContainer.tsx b/src/components/overlays/BlurredOverlayContainer.tsx index 2e5dfd8..bb7d1e8 100644 --- a/src/components/overlays/BlurredOverlayContainer.tsx +++ b/src/components/overlays/BlurredOverlayContainer.tsx @@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react' -type Props = { - visible?: boolean +export type BlurredOverlayContainerProps = { + visible: boolean bgOpacity?: string changeDelay?: string effectdelay?: string @@ -17,7 +17,7 @@ const BlurredOverlayContainer = ({ children, onClick, ...props -}: Props) => { +}: BlurredOverlayContainerProps) => { const [loaded, setLoaded] = useState(visible) useEffect(() => {