Interface: AccountIconAndMenuProps
Defined in: components/AccountIconAndMenu.tsx:25
Properties
accountHeaderLoginForm?
optionalaccountHeaderLoginForm?:boolean
Defined in: components/AccountIconAndMenu.tsx:55
Show login form in dropdown for immediate login when user is not logged in.
Default
true
accountMenuTitle?
optionalaccountMenuTitle?:string
Defined in: components/AccountIconAndMenu.tsx:49
Title for the account dropdown menu.
Default
'My account'
afterLogin?
optionalafterLogin?: (user,accessToken?,refreshToken?,expiresAt?,anonymousCart?) =>void
Defined in: components/AccountIconAndMenu.tsx:114
Callback fired after successful self-contained login. Not called in delegation mode — the parent handles the result there.
Parameters
user
Contact | Customer
accessToken?
string
refreshToken?
string
expiresAt?
string
anonymousCart?
Cart | null
Returns
void
beforeLogin?
optionalbeforeLogin?: () =>void
Defined in: components/AccountIconAndMenu.tsx:108
Callback fired before the login process starts.
Returns
void
cart?
optionalcart?:Cart|null
Defined in: components/AccountIconAndMenu.tsx:123
Anonymous cart snapshot — forwarded to the embedded LoginForm so its afterLogin receives it.
currentPath?
optionalcurrentPath?:string
Defined in: components/AccountIconAndMenu.tsx:198
Current route path, used in sidebar variant to highlight the active link.
displayForgotPasswordLink?
optionaldisplayForgotPasswordLink?:boolean
Defined in: components/AccountIconAndMenu.tsx:84
Show/hide the forgot password link inside the login form.
Default
true
displayGuestCheckoutLink?
optionaldisplayGuestCheckoutLink?:boolean
Defined in: components/AccountIconAndMenu.tsx:96
Show/hide the guest checkout link inside the login form.
Default
false
displayRegisterLink?
optionaldisplayRegisterLink?:boolean
Defined in: components/AccountIconAndMenu.tsx:90
Show/hide the register link inside the login form.
Default
true
graphqlClient?
optionalgraphqlClient?:GraphQLClient
Defined in: components/AccountIconAndMenu.tsx:63
GraphQL client for self-contained login. When provided (and onLoginSubmit is not), LoginForm handles authentication internally.
icon?
optionalicon?:string
Defined in: components/AccountIconAndMenu.tsx:36
Icon for the account icon in header.
Default
'default-account-icon'
iconClassName?
optionaliconClassName?:string
Defined in: components/AccountIconAndMenu.tsx:183
Additional class name for the account icon button.
labels?
optionallabels?:Record<string,string>
Defined in: components/AccountIconAndMenu.tsx:174
Labels for the component. Available keys: accountLabel, loginTitle, loginSubtitle, loginButton, signedInAs, logoutLabel.
loginButtonText?
optionalloginButtonText?:string
Defined in: components/AccountIconAndMenu.tsx:78
Label for the login submit button.
Default
'Log In'
loginError?
optionalloginError?:string
Defined in: components/AccountIconAndMenu.tsx:105
Error message shown inside the login form. Used in delegation mode (when onLoginSubmit is provided).
loginFormComponent?
optionalloginFormComponent?:ComponentType<LoginFormProps>
Defined in: components/AccountIconAndMenu.tsx:203
loginFormLabels?
optionalloginFormLabels?:Record<string,string>
Defined in: components/AccountIconAndMenu.tsx:180
Translated labels forwarded to the embedded <LoginForm> shown
in the dropdown when no user is signed in.
See LoginFormProps.labels for slugs (email, password, forgotPassword,
registerText, registerLink, noAccount, loggingIn, etc.).
loginFormSubtitle?
optionalloginFormSubtitle?:string
Defined in: components/AccountIconAndMenu.tsx:72
Subtitle displayed inside the login form.
loginFormTitle?
optionalloginFormTitle?:string
Defined in: components/AccountIconAndMenu.tsx:69
Title displayed inside the login form.
Default
'Welcome Back'
loginLoading?
optionalloginLoading?:boolean
Defined in: components/AccountIconAndMenu.tsx:162
Whether login is currently in progress (shows loading state on button).
Default
false
menuClassName?
optionalmenuClassName?:string
Defined in: components/AccountIconAndMenu.tsx:186
Additional class name for the dropdown menu.
menuLinks?
optionalmenuLinks?:AccountMenuLink[]
Defined in: components/AccountIconAndMenu.tsx:168
Account navigation links shown when user is authenticated.
Default
[{ label: 'Dashboard', href: '/account' }, ...]
onAccountIconClick?
optionalonAccountIconClick?: () =>void
Defined in: components/AccountIconAndMenu.tsx:136
Fires when account icon is clicked and showAccountMenuOnClick is false.
Returns
void
onForgotPasswordClick?
optionalonForgotPasswordClick?: () =>void
Defined in: components/AccountIconAndMenu.tsx:151
Fires when "Forgot Password" link is clicked.
Returns
void
onGuestCheckoutClick?
optionalonGuestCheckoutClick?: () =>void
Defined in: components/AccountIconAndMenu.tsx:99
Fires when the guest checkout link is clicked.
Returns
void
onLoginSubmit?
optionalonLoginSubmit?: (password) =>void
Defined in: components/AccountIconAndMenu.tsx:131
Fires when login form is submitted (delegation mode). Parent should handle actual authentication.
Parameters
email
string
password
string
Returns
void
onLogoutClick?
optionalonLogoutClick?: () =>void
Defined in: components/AccountIconAndMenu.tsx:146
Fires when logout is clicked.
Returns
void
onMenuItemClick?
optionalonMenuItemClick?: (href) =>void
Defined in: components/AccountIconAndMenu.tsx:141
Fires when a menu item is clicked. Receives the href.
Parameters
href
string
Returns
void
onRegisterClick?
optionalonRegisterClick?: () =>void
Defined in: components/AccountIconAndMenu.tsx:156
Fires when "Register" link is clicked.
Returns
void
showAccountMenuOnClick?
optionalshowAccountMenuOnClick?:boolean
Defined in: components/AccountIconAndMenu.tsx:43
Show account dropdown at the bottom of the icon when account icon is clicked. If false, fires onAccountIconClick() instead.
Default
true
user?
optionaluser?:Contact|Customer|null
Defined in: components/AccountIconAndMenu.tsx:30
Contact/Customer that this component will operate with. When present, shows account navigation. When null, shows login form.
variant?
optionalvariant?:"dropdown"|"sidebar"
Defined in: components/AccountIconAndMenu.tsx:193
Component variant.
- 'dropdown' (default): Header icon with popup menu
- 'sidebar': Always-visible vertical navigation for account layout