Defaults
Ez az oldal még csak angolul érhető el.
The defaults of @poltura/theme-sdk/cart.
Ezen az oldalon
import { … } from '@poltura/theme-sdk/cart';CartButton
The header's cart button: the item count, and the mini cart it opens, a popover on large screens and a side sheet below.
CartButton(props: CartButtonProps): ReactElementProps: CartButtonProps
Example
import { CartButton } from '@poltura/theme-sdk/cart';
export function HeaderActions() {
return <CartButton icon='bag' countPlacement='overlay' showLabel={false} />;
}MiniCart
The mini cart's body: compact lines, the total, the minimum order, and the cart and checkout buttons, or its empty and loading states.
MiniCart(props: MiniCartProps): ReactElementProps: MiniCartProps
Example
import { MiniCart, useCart } from '@poltura/theme-sdk/cart';
export function CartDrawerBody() {
const { miniCart } = useCart();
return <MiniCart surface='sheet' onClose={() => miniCart.setOpen(false)} />;
}See also: CartButton, CartLineItem