Skip to content
Snippets Groups Projects
Commit 4eb0d03e authored by David Bühler's avatar David Bühler
Browse files

[dome] Sidebars: allows section to have a context menu.

parent e3c7100e
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,8 @@ export interface SectionProps { ...@@ -99,6 +99,8 @@ export interface SectionProps {
disabled?: boolean; disabled?: boolean;
/** Badge summary (only visible when folded). */ /** Badge summary (only visible when folded). */
summary?: Badge; summary?: Badge;
/** Right-click callback. */
onContextMenu?: () => void;
/** Section contents. */ /** Section contents. */
children?: React.ReactNode; children?: React.ReactNode;
} }
...@@ -133,6 +135,7 @@ export function Section(props: SectionProps) { ...@@ -133,6 +135,7 @@ export function Section(props: SectionProps) {
<div <div
className="dome-xSideBarSection-title dome-color-frame" className="dome-xSideBarSection-title dome-color-frame"
title={props.label} title={props.label}
onContextMenu={props.onContextMenu}
> >
<Label label={props.label} /> <Label label={props.label} />
{!visible && makeBadge(props.summary)} {!visible && makeBadge(props.summary)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment