Skip to content

PanelHeaderProps

PanelHeaderProps were the props of the v2 PanelHeader, which rendered a panel’s title bar.

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;
};
PropDescription
linkA URI, client path or URL that the title links to.
titleThe title.
panelThe panel ID that the close button toggles.
isAdvertMarks a panel that shows ads. Defaults to false.
actionsControls shown in the header.
onCloseRuns before the panel closes from the close button.
preventDefaultCloseKeeps the panel open when the user clicks the close button. Defaults to false.
onBackRuns when the user clicks the back button. Without it, the header has no back button.
titleVariant, titleSemanticColorThe type style and color of the title. Default to balladBold and textBase.