The CartEstimatedCost component renders a Money component with the cost associated with the amountType prop. If no amountType prop is specified, then it defaults to totalAmount. If children is a function, then it will pass down the render props provided by the parent component.

Example code


Name Type Description
amountType? "total" | "subtotal" | "tax" | "duty" A string type that defines the type of cost needed. Valid values: total, subtotal, tax, or duty.
children? React A function that takes an object return by the useMoney hook and returns a ReactNode.

Component type

The CartEstimatedCost component is a client component, which means that it renders on the client. For more information about component types, refer to React Server Components.