Interface: CartIconAndSidebarProps
Defined in: components/CartIconAndSidebar.tsx:20
Properties
afterRequestAuthorization?
optionalafterRequestAuthorization?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:125
Fires after a successful purchase authorization request with the updated cart
Parameters
cart
Cart
Returns
void
cart
cart:
Cart
Defined in: components/CartIconAndSidebar.tsx:25
Shopping cart that this component will operate with. Should be passed from a cart state.
cartBonusItemsComponent?
optionalcartBonusItemsComponent?:ComponentType<CartBonusItemsProps>
Defined in: components/CartIconAndSidebar.tsx:146
cartBonusItemsLabels?
optionalcartBonusItemsLabels?:Record<string,string>
Defined in: components/CartIconAndSidebar.tsx:101
Labels for the bonus-items block. Keys: title, sku.
cartCheckoutButton?
optionalcartCheckoutButton?:boolean
Defined in: components/CartIconAndSidebar.tsx:67
Show checkout button in cart sidebar for immediate checkout.
Default
true
cartItemComponent?
optionalcartItemComponent?:ComponentType<CartItemProps>
Defined in: components/CartIconAndSidebar.tsx:144
Replaces each cart row rendered inside the drawer with a custom CartItem. The drawer composes CartItem with cardFrame=false, showDelete=false, readOnlyQuantity, and onTitleClick wired to close the sidebar — any consumer-supplied replacement receives these variant props plus the cart data.
cartItemLabels?
optionalcartItemLabels?:Record<string,string>
Defined in: components/CartIconAndSidebar.tsx:98
Labels forwarded to the inner CartItem rows (e.g. qtyPrefix). Without
this the sidebar's line items fell back to English ("Qty:") even on a
localized page. Keys match CartItem's label map.
cartPageButton?
optionalcartPageButton?:boolean
Defined in: components/CartIconAndSidebar.tsx:78
Show shopping cart page button in cart sidebar.
Default
true
cartSidebarTitle?
optionalcartSidebarTitle?:string
Defined in: components/CartIconAndSidebar.tsx:61
Title for the shopping cart sidebar.
Default
'Shopping cart'
companyId?
optionalcompanyId?:number
Defined in: components/CartIconAndSidebar.tsx:113
Active company ID — used to look up the user's PAC for this company
configuration?
optionalconfiguration?:any
Defined in: components/CartIconAndSidebar.tsx:107
Configuration object passed to the component
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/CartIconAndSidebar.tsx:119
GraphQL client — used for internal CartService calls (e.g. purchase authorization)
icon?
optionalicon?:string
Defined in: components/CartIconAndSidebar.tsx:31
Icon for the cart icon in header.
Default
'default-cart-icon'
iconClassName?
optionaliconClassName?:string
Defined in: components/CartIconAndSidebar.tsx:131
- Additional class name for the shopping cart icon.
labels?
optionallabels?:Record<string,string>
Defined in: components/CartIconAndSidebar.tsx:91
Labels for the component. Available keys: cartIconLabel, totalLabel, itemsLabel, emptyCart, continueShopping, qty, total, totalExclVat, checkoutButton, cartPageButton, closeLabel
language?
optionallanguage?:string
Defined in: components/CartIconAndSidebar.tsx:110
Language code passed to CartService operations. Defaults to 'en'.
onCartIconClick?
optionalonCartIconClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:55
Fires a click event when showCartSidebarOnClick is set to false.
Parameters
cart
Cart
Returns
void
onCartPageButtonClick?
optionalonCartPageButtonClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:83
Fires a click event when the shopping cart button in the sidebar is clicked.
Parameters
cart
Cart
Returns
void
onCheckoutButtonClick?
optionalonCheckoutButtonClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:72
Fires a click event when the checkout button in the sidebar is clicked.
Parameters
cart
Cart
Returns
void
onError?
optionalonError?: (error) =>void
Defined in: components/CartIconAndSidebar.tsx:128
Error handler for authorization request failures
Parameters
error
Error
Returns
void
onRequestAuthorization?
optionalonRequestAuthorization?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:122
Override the internal request purchase authorization call
Parameters
cart
Cart
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:116
Callback fired when "Request a Quote" is clicked in the sidebar. Only shown for contacts when prop is provided.
Parameters
cart
Cart
Returns
void
showBadge?
optionalshowBadge?:boolean
Defined in: components/CartIconAndSidebar.tsx:37
Shows item count badge on the cart icon.
Default
true
showCartSidebarOnClick?
optionalshowCartSidebarOnClick?:boolean
Defined in: components/CartIconAndSidebar.tsx:50
Show cart sidebar at the right side of the screen when cart icon is clicked. If false it will fire onCartIconClick() instead.
Default
true
showTotals?
optionalshowTotals?:boolean
Defined in: components/CartIconAndSidebar.tsx:43
Shows the totals of the shopping cart beneath the icon when hovered.
Default
false
sidebarClassName?
optionalsidebarClassName?:string
Defined in: components/CartIconAndSidebar.tsx:134
- Additional class name for the shopping cart sidebar.
user?
optionaluser?:Contact|Customer
Defined in: components/CartIconAndSidebar.tsx:104
Logged-in user — used to determine purchaser role and authorization limit