From 7b0aec8d849afcb5aeb120c07fa79ac73d1cd61d Mon Sep 17 00:00:00 2001 From: Mahyar Khanbolooki Date: Tue, 12 Aug 2025 19:48:08 +0330 Subject: [PATCH] add: side menu dark theme --- src/app/[name]/(Main)/layout.tsx | 2 +- src/components/icons/TelegramIcon.tsx | 5 +++-- src/components/menu/SideMenu.tsx | 22 +++++++++++----------- src/components/menu/SideMenuItem.tsx | 3 ++- src/components/utils/Modal.tsx | 2 +- src/components/utils/Prompt.tsx | 2 +- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/app/[name]/(Main)/layout.tsx b/src/app/[name]/(Main)/layout.tsx index f7652e0..41cfd61 100644 --- a/src/app/[name]/(Main)/layout.tsx +++ b/src/app/[name]/(Main)/layout.tsx @@ -1,4 +1,4 @@ -import ClientMenuRouteWrapper from "@/components/wrapper/ClientMenuRouteWrapper.tsx"; +import ClientMenuRouteWrapper from "@/components/wrapper/ClientMenuRouteWrapper"; import ClientSideWrapper from "@/components/wrapper/ClientSideWrapper"; export const metadata = { diff --git a/src/components/icons/TelegramIcon.tsx b/src/components/icons/TelegramIcon.tsx index 189acac..ee92ab0 100644 --- a/src/components/icons/TelegramIcon.tsx +++ b/src/components/icons/TelegramIcon.tsx @@ -6,19 +6,20 @@ const TelegramIcon: React.FC> = (props) => ( height="24" viewBox="0 0 24 24" fill="none" + stroke='currentcolor' xmlns="http://www.w3.org/2000/svg" {...props} // This allows passing additional props like className, style, etc. > } @@ -134,7 +134,7 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
  • { e.stopPropagation(); }} - className="fixed top-0 bottom-0 right-0 bg-white w-[200px] h-dvh flex flex-col z-40 overflow-clip not-xl:!rounded-s-none" + className="fixed top-0 bottom-0 right-0 bg-container w-[200px] h-dvh flex flex-col z-40 overflow-clip not-xl:!rounded-s-none" > {renderMenu()} @@ -211,7 +211,7 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS onClick={toggleShareModal} >

    - + {tShareModal('Heading')}

    @@ -219,21 +219,21 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS

    - + Telegram
    - + WhatsApp
    - + Instagram
    @@ -245,7 +245,7 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS onClick={toggleInstallPwaModal} >

    - + {tInstallPwaModal('Heading')}

    diff --git a/src/components/menu/SideMenuItem.tsx b/src/components/menu/SideMenuItem.tsx index dd7d451..ad0d900 100644 --- a/src/components/menu/SideMenuItem.tsx +++ b/src/components/menu/SideMenuItem.tsx @@ -17,12 +17,13 @@ export default function SideMenuItem({ href, title, icon, className, children, . inline-flex gap-3 ps-6 xl:ps-9 h-full w-full items-center overflow-hidden text-nowrap text-xs font-light text-disabled-text border-transparent data-[active]:border-s-6 data-[active]:border-black data-[active]:text-black + dark:data-[active]:border-foreground dark:data-[active]:text-foreground ${className} `} > {children} {icon} - {title} + {title} ) } \ No newline at end of file diff --git a/src/components/utils/Modal.tsx b/src/components/utils/Modal.tsx index dad18c1..1833a0d 100644 --- a/src/components/utils/Modal.tsx +++ b/src/components/utils/Modal.tsx @@ -22,7 +22,7 @@ function Modal({ visible, onClick, children, ...rest }: Props) { {children} diff --git a/src/components/utils/Prompt.tsx b/src/components/utils/Prompt.tsx index 342ea28..5551a77 100644 --- a/src/components/utils/Prompt.tsx +++ b/src/components/utils/Prompt.tsx @@ -38,7 +38,7 @@ function Prompt({ title, description, textConfirm, textCancel, onConfirm, onCanc -