HeaderActions
HeaderActions is a sub-component of the Header organism.
It is used as a containing element for the account / language actions in the Header.
Itβs worth noting that the account actions will only appear if the user prop has been provided to the root Header component. This is because the account actions need to appear in several different places depending on the screen width.
Basic Usage
import {
Header,
HeaderActions,
HeaderLanguageSwitcher
} from '@krakentech/coral-organisms';
<Header
locales={{ en: 'English', es: 'Espanol' }}
currentLocale="en"
user={{
href: '#!',
preferredName: 'Peter Miller',
preferredNameFallback: 'Account',
isAuthenticated: true,
login: {
href: '#!',
label: 'Log in',
},
}}
>
<HeaderActions>
<HeaderLanguageSwitcher ... />
</HeaderActions>
</Header>Last updated on