From bac30213c86752b106fe86537851ebe0f51a1794 Mon Sep 17 00:00:00 2001 From: sonnguyenkieio Date: Tue, 7 Sep 2021 10:24:48 +0700 Subject: [PATCH] :sparkles: feat: Tab Common --- src/components/common/TabCommon/TabCommon.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/common/TabCommon/TabCommon.tsx b/src/components/common/TabCommon/TabCommon.tsx index 67fe107a6..c744f1a2a 100644 --- a/src/components/common/TabCommon/TabCommon.tsx +++ b/src/components/common/TabCommon/TabCommon.tsx @@ -4,10 +4,10 @@ import s from './TabCommon.module.scss' import TabItem from './TabItem/TabItem' interface TabCommonProps { - changeTab: (target:string) => void; + changeTabPane: (target:string) => void; } -const TabCommon = ({ changeTab } : TabCommonProps) => { +const TabCommon = ({ changeTabPane } : TabCommonProps) => { const active = "active", unActive = ""; const [item1Active, setItem1Active] = useState(active); const [item2Active, setItem2Active] = useState(unActive); @@ -28,7 +28,7 @@ const TabCommon = ({ changeTab } : TabCommonProps) => { function toggleItem1():void { setItem1Active(active) - changeTab("waiting") + changeTabPane("waiting") setItem2Active(unActive) setItem3Active(unActive) @@ -37,7 +37,7 @@ const TabCommon = ({ changeTab } : TabCommonProps) => { function toggleItem2():void { setItem2Active(active) - changeTab("delivering") + changeTabPane("delivering") setItem1Active(unActive) setItem3Active(unActive) @@ -45,7 +45,7 @@ const TabCommon = ({ changeTab } : TabCommonProps) => { } function toggleItem3():void { setItem3Active(active) - changeTab("delivered") + changeTabPane("delivered") setItem1Active(unActive) setItem2Active(unActive)