From 0f78bc94e3b55a718e4ba620b02994afc866672c Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 20 Feb 2024 11:37:15 +0700
Subject: Update promo item name tooltip

---
 src-migrate/modules/product-promo/components/Item.tsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

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

diff --git a/src-migrate/modules/product-promo/components/Item.tsx b/src-migrate/modules/product-promo/components/Item.tsx
index 8012c17e..b396160f 100644
--- a/src-migrate/modules/product-promo/components/Item.tsx
+++ b/src-migrate/modules/product-promo/components/Item.tsx
@@ -1,8 +1,8 @@
 import style from '../styles/item.module.css'
 
-import React from 'react'
-import Image from '~/components/ui/image'
+import { Tooltip } from '@chakra-ui/react'
 
+import Image from '~/components/ui/image'
 import { IProductVariantPromo } from '~/types/promotion'
 
 type Props = {
@@ -22,7 +22,11 @@ const ProductPromoItem = ({
           {variant.qty} pcs {isFree ? '(free)' : ''}
         </div>
       </div>
-      <div className={style.name}>{variant.name}</div>
+      <Tooltip label={variant.display_name} placement='top' fontSize='sm'>
+        <div className={style.name}>
+          {variant.name}
+        </div>
+      </Tooltip>
     </div>
   )
 }
-- 
cgit v1.2.3

