SidePanel
The side panel is the main navigation for the new Adjust platform design. In terms of visual hierarchy, it is on top of all other regular content or components on the page. Modal dialogs may overlay the side panel.
Example
Sub Components
The navigation component is based on two sub-components (NavSection
and NavItem
) and is responsible for rendering Navigation items in the proper place with the proper styles.
NavSection
The NavSection component is used for rendering the first-level
navigation elements.
Props:
Name | Type | Description |
---|---|---|
id | string | number | Prop to provide a unique ID to the component. |
title | string | Prop to provide nav section title value |
brand | "datascape" | "pulse" | "campaign_lab" | "dataworks" | "appview" | Prop to provide a brand icon for the NavSection |
dataTestId | string | Prop to provide to unique data-testid |
children | ReactNode | Prop to provide to second and thirdlevel nav items. Please use only NavItem component as a child element. |
isActive | boolean | Prop to define the item as the active item. |
onClick | (id: IDtype, isExpanded: boolean) => void | A callback function to inform the parent component with the item id and expanded state on click |
onMouseEnter | (id: IDtype, isExpanded: boolean) => void | A callback function to inform parent component with the item id and expanded state on mouse enter |
expandWithHover | boolean | A boolean value to activate expanding on hover to item |
NavItem
The NavItem
component is used for rendering the first-level
navigation elements.
Props:
Name | Type | Description |
---|---|---|
id | string | number | Prop to provide a unique ID to the component. |
title | string | Prop to provide nav section title value |
brand | "datascape" | "pulse" | "campaign_lab" | "dataworks" | "appview" | Prop to provide nav section brand icon |
dataTestId | string | Prop to provide to unique data-testid |
children | ReactNode | Prop to provide to second and thirdlevel nav items. Please use only NavItem component as a child element. |
isActive | boolean | Prop to define the item as the active item. |
onClick | (id: IDtype, isExpanded: boolean) => void | A callback function to inform parent component with the item id and expanded state on click |
expandWithHover | boolean | A boolean value to activate expanding on hover to item |
type | 'headline' | 'headline-labeled' | 'plain' | Prop to identify the type of the nav item. |
tooltipContent | string | ReactNode | Prop to display tooltip with the nav item |
Account
The Account control component for the SidePanel.
Name | Type | Description |
---|---|---|
children | ReactNode | Prop to provide the items for the Account dropdown menu. Please useActionItem component as child element |
name | string | Prop to provide account name |
title | string | Prop to provide title for the account name |
action | ReactNode | Prop to provide action button for the account dropdown of expanded state of SidePanel |
footerActions | ReactNode | Prop to provide action buttons for the account dropdown's footer of expanded state of SidePanel |
tooltipTitle | string | Prop to provide the tooltip content |
dataTestId | string | Prop to provide to unique data-testid |
isActive | boolean | Prop to make account action items active |
ActionMenu
The Action Menu is a component used for rendering items in the dropdown. To render the items in the action menu with the proper style, please use the ActionMenuItem
sub-component within.
Name | Type | Description |
---|---|---|
icon | IconName | Prop to provide an icon as ActionMenu trigger. |
dataTestId | string | Prop to provide to unique data-testid |
children | ReactNode | Prop to provide the dropdown content for the Action Menu. To render the items in the action menu with the proper style, please use the ActionMenuItem sub-component |
isActive | boolean | Prop to make ActionMenu opened |
onToggle | (isExpanded: boolean) => void | A callback function to inform parent component with the item expanded state. |
footer | ReactNode | The footer part of the action menu. You can provide a Button for this area. Please use only two buttons here, as in the example. And use only the Atlas Button component. This prop should be used only for the Account component content. |
action | ReactNode | Prop to use an action button for the Account area dropdown content. Please use only the Atlas Button component shown in the example |
ActionMenuItem
The Action Menu item is the sub component of SidePanel's ActionMenu. you can use the following props with the component.
Name | Type | Description |
---|---|---|
id | string | number | Prop to provide a unique ID to the component. |
isActive | boolean | Prop to define the item as the active item. |
icon | IconName | Prop to add icon to action menu item |
onClick | (id: IDtype) => void | A callback function to inform parent component with the clicked item id. |
children | ReactNode | Item content |
LanguageSelector
The Language selector component for the SidePanel.
Name | Type | Description |
---|---|---|
children | ReactNode | Prop to provide the item content |
activeLanguage | string | Prop to provide the selected language value. |
dataTestId | string | Prop to provide to unique data-testid default:sidepanel-language-selector |
tooltipTitle | string | Prop to provide the tooltip content |
LanguageItem
The Language selector item sub component
Name | Type | Description |
---|---|---|
children | ReactNode | Prop to provide the item content |
dataTestId | string | Prop to provide to unique data-testid default:sidepanel-language-selector |
isActive | boolean | Prop to define the item as the active item. |
onClick | (id: IDtype) => void | A callback function to inform parent component with the clicked item id. |
FooterActions
A component renders the actions in the SidePanel's footer area.
Name | Type | Description |
---|---|---|
children | ReactNode | Prop to provide the item content |
tooltipTitle | string | Prop to provide the tooltip content |
onToggleFooterActionMenu | (isVisible: boolean) => void | A callback function to inform parent component with the footer action expand/collapse state. |
dataTestId | string | Prop to provide to unique data-testid |
FooterActionItem
A component renders an IconButton
action item in the footer area.
Name | Type | Description |
---|---|---|
children | ReactNode | Prop to provide the item content |
isActive | boolean | Prop to define the item as the active item. |
icon | IconName | Prop to define the icon for action item. |
value | string | Prop to define title for action item. |
onClick | (id?: IDtype) => void | A callback function to inform parent component with the clicked item id |
dataTestId | string | Prop to provide to unique data-testid |
notificationCount | number | Prop to provide to notification count and badge to action item. Please use only with the Resource Center action. |
dropdownContent | ReactNode | Prop to provide dropdown to footer action item. Please use only with the Resource Center action. |
Props
Name | Type | Default |
---|---|---|
onToggle |
| — |
isOpen |
| — |
onClickHeaderAction |
| — |
footer |
| — |
data-{foo} Data attributes can be used by testing libraries to retrieve components or assert their existence |
| — |
* - the prop is required. |