From 89f32128f37d99b490de7590e2116a9cfd853f89 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 22 Dec 2023 17:33:46 +0700
Subject: Update promotion program feature

---
 .../product-promo/components/CategoryTab.tsx       | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 src-migrate/modules/product-promo/components/CategoryTab.tsx

(limited to 'src-migrate/modules/product-promo/components/CategoryTab.tsx')

diff --git a/src-migrate/modules/product-promo/components/CategoryTab.tsx b/src-migrate/modules/product-promo/components/CategoryTab.tsx
new file mode 100644
index 00000000..edc4aa92
--- /dev/null
+++ b/src-migrate/modules/product-promo/components/CategoryTab.tsx
@@ -0,0 +1,34 @@
+import React from 'react'
+import style from '../styles/category-tab.module.css'
+import { useModalStore } from '../stores/useModalStore'
+import clsxm from '~/common/libs/clsxm'
+import { ICategoryPromo } from '~/common/types/promotion'
+
+const TABS: ICategoryPromo[] = [
+  { value: 'bundling', label: 'Bundling' },
+  { value: 'discount_loading', label: 'Discount Loading' },
+  { value: 'merchandise', label: 'Free Merchant' },
+]
+
+const ProductPromoCategoryTab = () => {
+  const { activeTab, changeTab } = useModalStore()
+  return (
+    <div className={style.tabs}>
+      {TABS.map((tab) => (
+        <button
+          key={tab.value}
+          type='button'
+          className={clsxm({
+            [style.tab]: true,
+            [style.tabActive]: activeTab === tab.value
+          })}
+          onClick={() => changeTab(tab.value)}
+        >
+          {tab.label}
+        </button>
+      ))}
+    </div>
+  )
+}
+
+export default ProductPromoCategoryTab
\ No newline at end of file
-- 
cgit v1.2.3

