@hanzo/commerce 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import React, {type PropsWithChildren} from 'react'
|
|
3
|
+
|
|
4
|
+
import BuyItemPopup from './buy-item-popup'
|
|
5
|
+
import BuyItemMobileDrawer from './buy-item-mobile-drawer'
|
|
6
|
+
|
|
7
|
+
const BuyItemButtonWrapper: React.FC<{
|
|
8
|
+
skuPath: string
|
|
9
|
+
desktopTrigger: React.ReactNode
|
|
10
|
+
mobileTrigger: React.ReactNode
|
|
11
|
+
popupClx?: string
|
|
12
|
+
}> = ({
|
|
13
|
+
skuPath,
|
|
14
|
+
desktopTrigger,
|
|
15
|
+
mobileTrigger,
|
|
16
|
+
popupClx=''
|
|
17
|
+
}) => (<>
|
|
18
|
+
<BuyItemPopup skuPath={skuPath} popupClx={popupClx}>
|
|
19
|
+
{desktopTrigger}
|
|
20
|
+
</BuyItemPopup>
|
|
21
|
+
<BuyItemMobileDrawer skuPath={skuPath} trigger={mobileTrigger} />
|
|
22
|
+
</>
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export default BuyItemButtonWrapper
|
|
@@ -40,7 +40,7 @@ const SelectCategoryItemCard: React.FC<React.HTMLAttributes<HTMLDivElement> & It
|
|
|
40
40
|
const item = category.products[0] as LineItem
|
|
41
41
|
return (
|
|
42
42
|
<div className={cn('flex flex-col justify-center items-center ' + (mobilePicker ? 'h-[180px] ' : 'h-auto min-h-24'), className)}>
|
|
43
|
-
<p className='text-lg font-semibold'>{item.titleAsOption + ', ' + formatPrice(item.price)}</p>
|
|
43
|
+
<p className='text-lg text-center font-semibold'>{item.titleAsOption + ', ' + formatPrice(item.price)}</p>
|
|
44
44
|
</div>
|
|
45
45
|
)
|
|
46
46
|
}
|
|
@@ -15,9 +15,9 @@ const CloseButton: React.FC<{
|
|
|
15
15
|
variant='ghost'
|
|
16
16
|
size='icon'
|
|
17
17
|
onClick={onClose}
|
|
18
|
-
className={className}
|
|
18
|
+
className={'group ' + className}
|
|
19
19
|
>
|
|
20
|
-
<ChevronLeft className='w-5 h-5'/>
|
|
20
|
+
<ChevronLeft className='w-5 h-5 group-hover:scale-110 transition-scale transition-duration-300'/>
|
|
21
21
|
</Button>
|
|
22
22
|
)
|
|
23
23
|
|
package/components/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as AddToCartWidget } from './add-to-cart-widget'
|
|
2
|
+
export { default as BuyItemButtonWrapper } from './buy-item/buy-item-button-wrapper'
|
|
2
3
|
export { default as BuyItemButton } from './buy-item/buy-item-button'
|
|
3
4
|
export { default as BuyItemCard } from './buy-item/buy-item-card'
|
|
4
5
|
export { default as BuyItemPopup } from './buy-item/buy-item-popup'
|