diff --git a/src/components/ActionPanel/ActionPanel.tsx b/src/components/ActionPanel/ActionPanel.tsx
index a974a24..f8bb805 100644
--- a/src/components/ActionPanel/ActionPanel.tsx
+++ b/src/components/ActionPanel/ActionPanel.tsx
@@ -37,9 +37,12 @@ export const ActionPanel = (props: ActionPanelProps) => {
const content = (
- {props.items.map((item) => (
-
- ))}
+ {props.items.map(({wrapTo, ...item}) => {
+ const key = `dk-action-panel-${item.id}`;
+ const children =
;
+
+ return wrapTo ? wrapTo({...item, key, children}) : children;
+ })}
);
diff --git a/src/components/ActionPanel/types.ts b/src/components/ActionPanel/types.ts
index 14589e4..592b564 100644
--- a/src/components/ActionPanel/types.ts
+++ b/src/components/ActionPanel/types.ts
@@ -10,6 +10,9 @@ export type ActionPanelItem = {
qa?: string;
onClick?: () => void;
dragProps?: ItemDragProps;
+ wrapTo?: (
+ props: Omit & {key: React.Key; children: React.ReactNode},
+ ) => React.ReactNode;
};
export type ActionPanelProps = {