Skip to content

Commit

Permalink
Wire up wrapper through Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mofojed committed May 29, 2023
1 parent d20f01a commit ded3748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/dashboard/src/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
ComponentType,
ForwardRefExoticComponent,
RefAttributes,
useEffect,
Expand Down Expand Up @@ -40,6 +41,9 @@ export type DashboardProps = {
>;
hydrate?: PanelHydrateFunction;
dehydrate?: PanelDehydrateFunction;

/** Component to wrap each panel with */
panelWrapper?: ComponentType;
};

export function Dashboard({
Expand All @@ -54,6 +58,7 @@ export function Dashboard({
fallbackComponent = PanelPlaceholder,
hydrate,
dehydrate,
panelWrapper,
}: DashboardProps): JSX.Element {
const layoutElement = useRef<HTMLDivElement>(null);
const [isInitialized, setIsInitialized] = useState(false);
Expand Down Expand Up @@ -140,6 +145,7 @@ export function Dashboard({
onLayoutInitialized={onLayoutInitialized}
hydrate={hydrate}
dehydrate={dehydrate}
panelWrapper={panelWrapper}
>
{children}
</DashboardLayout>
Expand Down

0 comments on commit ded3748

Please sign in to comment.