From 5f7a2d688528085217396e3f996a0fd374c0cfb4 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Tue, 26 Sep 2023 12:46:09 +0300 Subject: [PATCH] Use IconButtomWithDot with every icon --- src/pages/Dashboard/IconButtonWithDot.tsx | 6 ++-- src/pages/Dashboard/LeftSidebar.tsx | 36 +++++++---------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/pages/Dashboard/IconButtonWithDot.tsx b/src/pages/Dashboard/IconButtonWithDot.tsx index d3f5c5df..55c28308 100644 --- a/src/pages/Dashboard/IconButtonWithDot.tsx +++ b/src/pages/Dashboard/IconButtonWithDot.tsx @@ -6,12 +6,14 @@ type IconButtonWithDotProps = { iconEl: any; variant: 'ghost' | 'outline'; isDotOn: boolean; + selected?: boolean; + disabled?: boolean; }; -const IconButtonWithDot = ({ iconEl, variant, isDotOn }: IconButtonWithDotProps) => { +const IconButtonWithDot = ({ iconEl, variant, isDotOn, selected, disabled }: IconButtonWithDotProps) => { return ( - + {isDotOn && ( { return ( @@ -25,29 +24,16 @@ const LeftSidebar = () => { border: '1px solid #F0F2F5', }} > - } variant="ghost" selected /> - } variant="ghost" /> - } variant="outline" disabled /> - } variant="ghost" /> - } variant="ghost" /> - } variant="ghost" /> - - } variant="ghost" /> - - + } variant="ghost" isDotOn={false} selected={true} /> + } variant="ghost" isDotOn={false} /> + } variant="outline" isDotOn={false} disabled={true} /> + } variant="ghost" isDotOn={false} /> + } variant="ghost" isDotOn={false} /> + } variant="ghost" isDotOn={false} /> } variant="ghost" isDotOn={true} /> - } variant="ghost" /> + } variant="ghost" isDotOn={false} /> ) } -export default LeftSidebar +export default LeftSidebar;