Interface: CartIconAndSidebarProps
Defined in: components/CartIconAndSidebar.tsx:19
Properties
afterRequestAuthorization?
optionalafterRequestAuthorization?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:113
Fires after a successful purchase authorization request with the updated cart
Parameters
cart
Cart
Returns
void
cart
cart:
Cart
Defined in: components/CartIconAndSidebar.tsx:24
Shopping cart that this component will operate with. Should be passed from a cart state.
cartBonusItemsComponent?
optionalcartBonusItemsComponent?:ComponentType<CartBonusItemsProps>
Defined in: components/CartIconAndSidebar.tsx:134
cartCheckoutButton?
optionalcartCheckoutButton?:boolean
Defined in: components/CartIconAndSidebar.tsx:66
Show checkout button in cart sidebar for immediate checkout.
Default
true
cartItemComponent?
optionalcartItemComponent?:ComponentType<CartItemProps>
Defined in: components/CartIconAndSidebar.tsx:132
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.
cartPageButton?
optionalcartPageButton?:boolean
Defined in: components/CartIconAndSidebar.tsx:77
Show shopping cart page button in cart sidebar.
Default
true
cartSidebarTitle?
optionalcartSidebarTitle?:string
Defined in: components/CartIconAndSidebar.tsx:60
Title for the shopping cart sidebar.
Default
'Shopping cart'
companyId?
optionalcompanyId?:number
Defined in: components/CartIconAndSidebar.tsx:101
Active company ID — used to look up the user's PAC for this company
configuration?
optionalconfiguration?:any
Defined in: components/CartIconAndSidebar.tsx:95
Configuration object passed to the component
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/CartIconAndSidebar.tsx:107
GraphQL client — used for internal CartService calls (e.g. purchase authorization)
icon?
optionalicon?:string
Defined in: components/CartIconAndSidebar.tsx:30
Icon for the cart icon in header.
Default
'default-cart-icon'
iconClassName?
optionaliconClassName?:string
Defined in: components/CartIconAndSidebar.tsx:119
- Additional class name for the shopping cart icon.
labels?
optionallabels?:Record<string,string>
Defined in: components/CartIconAndSidebar.tsx:89
Labels for the component. Available keys: cartIconLabel, totalLabel, itemsLabel, emptyCart, continueShopping, qty, total, checkoutButton, cartPageButton, closeLabel
language?
optionallanguage?:string
Defined in: components/CartIconAndSidebar.tsx:98
Language code passed to CartService operations. Defaults to 'en'.
onCartIconClick?
optionalonCartIconClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:54
Fires a click event when showCartSidebarOnClick is set to false.
Parameters
cart
Cart
Returns
void
onCartPageButtonClick?
optionalonCartPageButtonClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:82
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:71
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:116
Error handler for authorization request failures
Parameters
error
Error
Returns
void
onRequestAuthorization?
optionalonRequestAuthorization?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:110
Override the internal request purchase authorization call
Parameters
cart
Cart
Returns
void
onRequestQuoteClick?
optionalonRequestQuoteClick?: (cart) =>void
Defined in: components/CartIconAndSidebar.tsx:104
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:36
Shows item count badge on the cart icon.
Default
true
showCartSidebarOnClick?
optionalshowCartSidebarOnClick?:boolean
Defined in: components/CartIconAndSidebar.tsx:49
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:42
Shows the totals of the shopping cart beneath the icon when hovered.
Default
false
sidebarClassName?
optionalsidebarClassName?:string
Defined in: components/CartIconAndSidebar.tsx:122
- Additional class name for the shopping cart sidebar.
user?
optionaluser?:Contact|Customer
Defined in: components/CartIconAndSidebar.tsx:92
Logged-in user — used to determine purchaser role and authorization limit