@butternutbox/pawprint-native 0.24.1 → 0.24.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.
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/ProductDisplayCard/ProductDisplayCard.tsx +9 -2
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ export type ProductDisplayCardProps = ViewProps & {
|
|
|
27
27
|
incrementDisabled?: boolean
|
|
28
28
|
decrementDisabled?: boolean
|
|
29
29
|
minQuantity?: number
|
|
30
|
+
quantityStep?: number
|
|
30
31
|
image?: string | React.ReactNode
|
|
31
32
|
imageBackgroundColor?: string
|
|
32
33
|
thumbnailWidth?: number
|
|
@@ -196,6 +197,7 @@ const StyledNoneBanner = styled(View)(({ theme }) => {
|
|
|
196
197
|
* @param quantityBadge - *(optional)* Show a quantity badge over the image instead
|
|
197
198
|
* of the picker (renders the current `quantity`). Mutually exclusive with the
|
|
198
199
|
* quantity picker; defaults to `false`. Used on OOB recipe and Extras cards.
|
|
200
|
+
* @param quantityStep - *(optional)* Increment/decrement amount (default: 1)
|
|
199
201
|
* @param image - *(optional)* Image URL string or React element
|
|
200
202
|
* @param banner - *(optional)* Banner content string or React element to show below card
|
|
201
203
|
* @param showBanner - *(optional)* Show/hide banner
|
|
@@ -220,6 +222,7 @@ export const ProductDisplayCard = React.forwardRef<
|
|
|
220
222
|
incrementDisabled = false,
|
|
221
223
|
decrementDisabled = false,
|
|
222
224
|
minQuantity = 1,
|
|
225
|
+
quantityStep = 1,
|
|
223
226
|
image,
|
|
224
227
|
imageBackgroundColor,
|
|
225
228
|
thumbnailWidth,
|
|
@@ -294,8 +297,12 @@ export const ProductDisplayCard = React.forwardRef<
|
|
|
294
297
|
handleQuantityChange(value)
|
|
295
298
|
}
|
|
296
299
|
}}
|
|
297
|
-
onIncrement={() =>
|
|
298
|
-
|
|
300
|
+
onIncrement={() =>
|
|
301
|
+
handleQuantityChange(quantity + quantityStep)
|
|
302
|
+
}
|
|
303
|
+
onDecrement={() =>
|
|
304
|
+
handleQuantityChange(quantity - quantityStep)
|
|
305
|
+
}
|
|
299
306
|
min={minQuantity}
|
|
300
307
|
accessible
|
|
301
308
|
accessibilityLabel={`Quantity: ${quantity}`}
|