From 25a1a5f7ddb1c8d077dcc63548887a2048840b13 Mon Sep 17 00:00:00 2001 From: Shak Date: Wed, 10 Dec 2025 12:56:35 +0330 Subject: [PATCH 1/3] refactor: add children prop to TabManager for additional tab buttons --- src/components/tab-manager.tsx | 54 +++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/src/components/tab-manager.tsx b/src/components/tab-manager.tsx index 09d34295..610353d7 100644 --- a/src/components/tab-manager.tsx +++ b/src/components/tab-manager.tsx @@ -17,6 +17,7 @@ interface TabManagerProps { onTabChange?: (tabValue: string) => void direction?: 'rtl' | 'ltr' tabPosition?: 'top' | 'side' + children?: ReactNode // for additional tab buttons at the end of aside (just pass the actual buttons) } export const TabManager = ({ @@ -27,6 +28,7 @@ export const TabManager = ({ direction = 'rtl', tabOwner, tabPosition, + children, }: TabManagerProps) => { const [activeTab, setActiveTab] = useState(defaultTab || tabs[0]?.value || '') const contentRef = useRef(null) @@ -69,28 +71,38 @@ export const TabManager = ({ ? 'shrink-0 md:overflow-y-auto w-full' : 'md:flex-col md:w-48 shrink-0 md:overflow-y-auto' return ( -
-
- {tabs.map(({ label, value, icon, isNew }) => ( - - ))} -
{' '} + + {icon} + {isNew && ( + + )} + + {label} + + ))} + {children} +
+
+ {children} +
+ +
Date: Wed, 10 Dec 2025 12:56:43 +0330 Subject: [PATCH 2/3] refactor: adjust button layout in SettingModal for improved whitespace management --- src/layouts/setting/setting-modal.tsx | 32 ++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/layouts/setting/setting-modal.tsx b/src/layouts/setting/setting-modal.tsx index 541dd6ce..85c8068d 100644 --- a/src/layouts/setting/setting-modal.tsx +++ b/src/layouts/setting/setting-modal.tsx @@ -96,22 +96,24 @@ export const SettingModal = ({ isOpen, onClose, selectedTab }: SettingModalProps defaultTab="general" selectedTab={selectedTab} direction="rtl" - /> - - + + + + setUpdateModalOpen(false)} From 2eb2a6307fa881eb25aa5bba0c40f58d0bcb663e Mon Sep 17 00:00:00 2001 From: sajjad isvand Date: Wed, 10 Dec 2025 15:57:36 +0330 Subject: [PATCH 3/3] refactor: improve button layout and whitespace management in TabManager and modals --- src/components/tab-manager.tsx | 44 +++++++++---------- src/layouts/setting/setting-modal.tsx | 32 +++++++------- .../widget-settings-modal.tsx | 19 ++++---- 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/src/components/tab-manager.tsx b/src/components/tab-manager.tsx index 610353d7..aa146e1c 100644 --- a/src/components/tab-manager.tsx +++ b/src/components/tab-manager.tsx @@ -72,33 +72,29 @@ export const TabManager = ({ : 'md:flex-col md:w-48 shrink-0 md:overflow-y-auto' return (
-
diff --git a/src/layouts/setting/setting-modal.tsx b/src/layouts/setting/setting-modal.tsx index 85c8068d..5f1a0721 100644 --- a/src/layouts/setting/setting-modal.tsx +++ b/src/layouts/setting/setting-modal.tsx @@ -97,21 +97,23 @@ export const SettingModal = ({ isOpen, onClose, selectedTab }: SettingModalProps selectedTab={selectedTab} direction="rtl" > - - +
+ + +
- + + ) }