CartLinePrice Component
The CartLinePrice component renders a Money component for the cart line merchandise's price or compare at price.
Usage
import React from "react";
import { CartLinePrice } from "@airsoko/react";
const MyComponent = () => {
return <CartLinePrice data={cartLine} priceType="regular" />;
};
export default MyComponent;Props
| Name | Type | Default | Description |
| ----------- | ---------------------------------------------------- | ------------ | ------------------ | -------------------------------------------------------------------- |
| data | PartialDeep<CartLine, { recurseIntoArrays: true }> | | A CartLine object. |
| priceType | "regular" | "compareAt" | "regular" | The type of price. Valid values: regular (default) or compareAt. |
Deprecated
This component is deprecated. Use Money instead. To migrate, use the priceType prop that matches the corresponding property on the CartLine object:
regular:cartLine.cost.totalAmountcompareAt:cartLine.cost.compareAtAmountPerQuantity