@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@butternutbox/pawprint-native",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "type": "module",
5
5
  "description": "ButternutBox Pawprint Design System - React Native Components",
6
6
  "main": "./dist/index.cjs",
@@ -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={() => handleQuantityChange(quantity + 1)}
298
- onDecrement={() => handleQuantityChange(quantity - 1)}
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}`}