@shopify/hydrogen-react 0.0.0-next-c23a62a → 0.0.0-next-aac51f0
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/dist/types/CartCost.d.ts +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Money } from './Money.js';
|
|
2
|
+
export interface CartCostProps {
|
|
3
|
+
/** A string type that defines the type of cost needed. Valid values: `total`, `subtotal`, `tax`, or `duty`. */
|
|
4
|
+
amountType?: 'total' | 'subtotal' | 'tax' | 'duty';
|
|
5
|
+
/** Any `ReactNode` elements. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The `CartCost` component renders a `Money` component with the
|
|
10
|
+
* cost associated with the `amountType` prop. If no `amountType` prop is specified, then it defaults to `totalAmount`.
|
|
11
|
+
Depends on `useCart()` and must be a child of `<CartProvider/>`
|
|
12
|
+
*/
|
|
13
|
+
export declare function CartCost(props: Omit<React.ComponentProps<typeof Money>, 'data'> & CartCostProps): JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/hydrogen-react",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-aac51f0",
|
|
4
4
|
"description": "React components, hooks, and utilities for creating custom Shopify storefronts",
|
|
5
5
|
"homepage": "https://github.com/Shopify/hydrogen-ui/tree/main/packages/react",
|
|
6
6
|
"license": "MIT",
|