CartAddLinesButton
Add several lines to the active cart in one write, creating a cart where there is none, and say why when the cart refuses. Disabled with nothing to add.
import { CartAddLinesButton } from "@evolve-storefront/feature-cart/cart-add-lines-button";Renders inside CartProvider.
Preview
Usage
// Reorder: the order's lines in one write, then on to the cart.<CartAddLinesButton lineItems={orderLinesToAdd(order)} onAdded={() => router.push("/cart")}/>;Props
| Prop | Type | Description |
|---|---|---|
lineItems | CartLineItemInput[] | What to add, in one write: an order's lines to reorder, a list's to buy. |
onAdded? | ((result: LineItemsAddedResult) => void) | After the write, overriding |
children? | ReactNode | The label. Defaults to "Add all to cart". |
Any other props go to the root element, like on a plain HTML element.

