summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-promo/components/CategoryTab.tsx
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-07-10 15:58:51 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-07-10 15:58:51 +0700
commit2e3c726bc8217f3960cfecec44b81303b03de72b (patch)
tree1b85ced7f61f3e4c3f1f27b577b37aa161615065 /src-migrate/modules/product-promo/components/CategoryTab.tsx
parent2b3bd9c0a454dbad69ce29cee877bfb1fca5dfa6 (diff)
parenta99bf6480eea556e53b85e6db45f3b8c2361e693 (diff)
Merge branch 'release' into development
# Conflicts: # src/pages/shop/product/variant/[slug].jsx
Diffstat (limited to 'src-migrate/modules/product-promo/components/CategoryTab.tsx')
-rw-r--r--src-migrate/modules/product-promo/components/CategoryTab.tsx34
1 files changed, 34 insertions, 0 deletions
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..c8e698c2
--- /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 '~/libs/clsxm'
+import { ICategoryPromo } from '~/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