Skip to content

Commit

Permalink
fix: Allow JSX.Element to be passed into a context action title
Browse files Browse the repository at this point in the history
- We already supported it, but we just didn't allow the type
  • Loading branch information
mofojed committed Sep 18, 2024
1 parent 96e3d43 commit 4d094b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type ResolvableContextAction =
export type MenuItem = ContextAction | Promise<ContextAction[]>;

export interface ContextAction {
title?: string;
title?: string | JSX.Element;
description?: string;
action?: (event: Event) => void;
actions?: ResolvableContextAction[];
Expand Down
3 changes: 2 additions & 1 deletion packages/dashboard-core-plugins/src/panels/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
ContextActions,
createXComponent,
LoadingOverlay,
ResolvableContextAction,
Tooltip,
} from '@deephaven/components';
import { LayoutUtils, PanelComponent, PanelEvent } from '@deephaven/dashboard';
Expand Down Expand Up @@ -60,7 +61,7 @@ export type CorePanelProps = {
onTabBlur?: (...args: unknown[]) => void;
onTabFocus?: (...args: unknown[]) => void;
renderTabTooltip?: () => ReactNode;
additionalActions?: ContextAction[];
additionalActions?: ResolvableContextAction[];
errorMessage?: string;
isLoading?: boolean;
isLoaded?: boolean;
Expand Down

0 comments on commit 4d094b0

Please sign in to comment.