diff --git a/src/components/common/TabCommon/TabCommon.module.scss b/src/components/common/TabCommon/TabCommon.module.scss new file mode 100644 index 000000000..b7ea32c04 --- /dev/null +++ b/src/components/common/TabCommon/TabCommon.module.scss @@ -0,0 +1,5 @@ +@import '../../../styles/utilities'; + +.tabCommon { + @apply spacing-horizontal; +} diff --git a/src/components/common/TabCommon/TabCommon.tsx b/src/components/common/TabCommon/TabCommon.tsx new file mode 100644 index 000000000..c5715ab5b --- /dev/null +++ b/src/components/common/TabCommon/TabCommon.tsx @@ -0,0 +1,43 @@ +import React, { useState } from "react" +import s from './TabCommon.module.scss' + +import TabItem from './TabItem/TabItem' + +interface TabCommonProps { + +} + +const TabCommon = ({ } : TabCommonProps) => { + const [item1Active, setItem1Active] = useState(true); + const [item2Active, setItem2Active] = useState(false); + const [item3Active, setItem3Active] = useState(false); + + const toggleItem1 = () => { + setItem1Active(true) + + setItem2Active(false) + setItem3Active(false) + } + const toggleItem2 = () => { + setItem2Active(true) + + setItem1Active(false) + setItem3Active(false) + } + const toggleItem3 = () => { + setItem3Active(true) + + setItem1Active(false) + setItem2Active(false) + } + + return ( +
+ Wait for Comfirmation + Delivering + Delivered +
+ ) +} + +export default TabCommon; \ No newline at end of file diff --git a/src/components/common/TabCommon/TabItem/TabItem.module.scss b/src/components/common/TabCommon/TabItem/TabItem.module.scss new file mode 100644 index 000000000..5bb3bfb15 --- /dev/null +++ b/src/components/common/TabCommon/TabItem/TabItem.module.scss @@ -0,0 +1,28 @@ +@import '../../../../styles/utilities'; + +.tabItem { + @apply font-bold; + margin-right: 2rem; + padding-top: 1rem; + padding-bottom: 1rem; + + &:hover { + @apply cursor-pointer; + } + + &.active { + border-bottom: 2px solid #2DC86E; + } +} + +.tabItemActive { + @apply font-bold; + margin-right: 2rem; + padding-top: 1rem; + padding-bottom: 1rem; + border-bottom: 2px solid #2DC86E; + + &:hover { + @apply cursor-pointer; + } +} \ No newline at end of file diff --git a/src/components/common/TabCommon/TabItem/TabItem.tsx b/src/components/common/TabCommon/TabItem/TabItem.tsx new file mode 100644 index 000000000..814f84e3e --- /dev/null +++ b/src/components/common/TabCommon/TabItem/TabItem.tsx @@ -0,0 +1,18 @@ +import React, { useState } from "react" +import s from './TabItem.module.scss' + +interface TabItemProps { + active?: boolean; + target?: any; + children?: string; +} + +const TabItem = ({ active, children } : TabItemProps) => { + return ( + + {children} + + ) +} + +export default TabItem; \ No newline at end of file