PanelHeaderProps
The PanelHeaderProps object is used to render a panel header.
type PanelHeaderProps = { link?: string; title?: string; panel: number; isAdvert?: boolean; actions?: React.ReactNode; onClose?: () => void; preventDefaultClose?: boolean; onBack?: (event: React.MouseEvent<HTMLButtonElement>) => void; titleVariant?: Variant; titleSemanticColor?: SemanticColor;};Properties
| Property | Type | Description |
|---|---|---|
| link | string | undefined | Href for the header link. Can be either a URI, a path within the app, or a URL for an external link. |
| title | string | undefined | Title of the header. |
| panel | number | Panel ID. Used to toggle panel open/closed state. |
| isAdvert | boolean | undefined | Whether or not the panel contains advertisements. Defaults to false |
| actions | React.ReactNode | undefined | Actions to render in the header. |
| onClose | () => void | undefined | Function to call when clicking on the close button. Called before the panel is closed. |
| preventDefaultClose | boolean | undefined | Prevent the panel from closing when clicking on the header close button. Defaults to false |
| onBack | (event: React.MouseEvent<HTMLButtonElement>) => void | undefined | Function to call when clicking on the header back button. If not provided, the back button will not be rendered. |
| titleVariant | Variant | undefined | Font variant for the header title. Defaults to "balladBold" |
| titleSemanticColor | SemanticColor | undefined | Semantic color name for the header title. Defaults to "textBase" |