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