From 2168fc27d8fcca1c7357a7f5428f926e1f8635f5 Mon Sep 17 00:00:00 2001 From: Sahid Rahman Date: Fri, 19 Apr 2024 09:47:32 +0700 Subject: [PATCH] change Dialog with React Aria Component Dialog --- .../Exercises/ExercisesFilterSort.tsx | 178 +++++++++--------- 1 file changed, 88 insertions(+), 90 deletions(-) diff --git a/src/components/Exercises/ExercisesFilterSort.tsx b/src/components/Exercises/ExercisesFilterSort.tsx index ca833d2..679d2e5 100644 --- a/src/components/Exercises/ExercisesFilterSort.tsx +++ b/src/components/Exercises/ExercisesFilterSort.tsx @@ -1,14 +1,8 @@ import { RefetchFnDynamic, graphql, useFragment } from "react-relay"; import { Dispatch, TransitionStartFunction } from "react"; -import { - Dialog, - DialogTrigger, - DialogContent, - DialogHeader, - DialogTitle, - DialogFooter, -} from "../ui/dialog"; - +import { Dialog } from "../ReactAriaUI/Dialog"; +import { Modal } from "../ReactAriaUI/Modal"; +import { DialogTrigger, Heading } from "react-aria-components"; import { Button } from "../ReactAriaUI/Button"; import { Filter } from "lucide-react"; import { ExerciseTypeInput } from "./ExerciseTypeInput"; @@ -52,96 +46,100 @@ function ExercisesFilterSort({ return (
- { dispatch({ type: "set_open", payload: open }); }} > - - - - - - Filter exercises - -
-
- - { - dispatch({ - type: "set_muscles_group", - payload: typeof key === "string" ? key : "", - }); + + + + + Filter exercises + +
+
+ + { + dispatch({ + type: "set_muscles_group", + payload: typeof key === "string" ? key : "", + }); + }} + /> +
+
+ + { + dispatch({ + type: "set_exercise_type", + payload: typeof key === "string" ? key : "", + }); + }} + /> +
+
-
- - { - dispatch({ - type: "set_exercise_type", - payload: typeof key === "string" ? key : "", +
+
- -
- - - - -
+
+ +