CartLineQuantityAdjustButton Component
The CartLineQuantityAdjustButton component renders a button that adjusts the quantity of a cart line when pressed. It must be a descendant of both the CartLineProvider and CartProvider components.
Usage
import React from "react";
import { CartLineQuantityAdjustButton } from "@airsoko/react";
const MyComponent = () => {
return <CartLineQuantityAdjustButton adjust="increase">Increase Quantity</CartLineQuantityAdjustButton>;
};
export default MyComponent;Props
| Name | Type | Default | Description |
|---|---|---|---|
adjust | 'increase' | 'decrease' | 'remove' | 'increase' | The adjustment for a cart line's quantity. Valid values are 'increase', 'decrease', or 'remove'. |
otherProps | Object | Any other props accepted by the underlying button component. |
Notes
- Ensure that the
CartLineQuantityAdjustButtoncomponent is a descendant of both theCartLineProviderandCartProvidercomponents to access necessary cart data. - The
CartLineQuantityAdjustButtoncomponent internally utilizes theuseCartanduseCartLinehooks to access cart-related functions and data.