From 4d59699e432f986fae71bb0c35c2efdd0f7eb26c Mon Sep 17 00:00:00 2001 From: hta218 Date: Fri, 13 Dec 2024 11:47:10 +0700 Subject: [PATCH] Update theme a11y and clean up --- app/components/drawer.tsx | 39 ------------------- app/components/header/menu/mobile-menu.tsx | 8 ++-- app/modules/cart.tsx | 14 +++---- app/sections/collection-filters/tools-bar.tsx | 5 ++- 4 files changed, 14 insertions(+), 52 deletions(-) delete mode 100644 app/components/drawer.tsx diff --git a/app/components/drawer.tsx b/app/components/drawer.tsx deleted file mode 100644 index 22961637..00000000 --- a/app/components/drawer.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import * as Dialog from "@radix-ui/react-dialog"; -import { cn } from "~/lib/cn"; - -export function DialogDemo({ - width = "400px", - openFrom, -}: { width?: string; openFrom: "left" | "right" }) { - return ( - - - - - - - - content goes here - - - - ); -} diff --git a/app/components/header/menu/mobile-menu.tsx b/app/components/header/menu/mobile-menu.tsx index 2c846322..08855fa1 100644 --- a/app/components/header/menu/mobile-menu.tsx +++ b/app/components/header/menu/mobile-menu.tsx @@ -1,7 +1,6 @@ import { CaretRight, List, X } from "@phosphor-icons/react"; import * as Collapsible from "@radix-ui/react-collapsible"; import * as Dialog from "@radix-ui/react-dialog"; -import * as VisuallyHidden from "@radix-ui/react-visually-hidden"; import { forwardRef } from "react"; import Link from "~/components/link"; import { ScrollArea } from "~/components/scroll-area"; @@ -39,13 +38,12 @@ export function MobileMenu() { } aria-describedby={undefined} > - - Mobile menu - + +
Menu
+
-
Menu
diff --git a/app/modules/cart.tsx b/app/modules/cart.tsx index fc9c1b16..1818f2eb 100644 --- a/app/modules/cart.tsx +++ b/app/modules/cart.tsx @@ -55,7 +55,7 @@ export function CartDetails({
0 ? "border-t border-line-subtle" : "", layout === "page" && "flex-grow md:translate-y-4 lg:col-span-2", - layout === "drawer" && "px-5 pb-5 overflow-auto transition", + layout === "drawer" && "overflow-auto transition", ])} >
    ))}
- +
); } @@ -212,10 +212,10 @@ function CartSummary({ layout: Layouts; }) { return ( -
{children} -
+
); } diff --git a/app/sections/collection-filters/tools-bar.tsx b/app/sections/collection-filters/tools-bar.tsx index 739cee17..be720ae8 100644 --- a/app/sections/collection-filters/tools-bar.tsx +++ b/app/sections/collection-filters/tools-bar.tsx @@ -82,10 +82,13 @@ function FiltersDrawer({ "fixed inset-y-0 w-full md:w-[360px] bg-[--color-background] py-4 z-10", "left-0 -translate-x-full data-[state=open]:animate-enter-from-left", ])} + aria-describedby={undefined} >
- Filters + + Filters +