From 8114a6ae77c192e8ed9bd9516c79615e3d6e3517 Mon Sep 17 00:00:00 2001 From: Ricky James Smith Date: Fri, 3 Jan 2025 10:15:07 +0100 Subject: [PATCH] Pass missing props to icon-button to of `ToolbarActionButton` to fix missing `onClick` (#3015) --- .changeset/nice-bugs-knock.md | 5 +++++ .../admin/src/common/toolbar/actions/ToolbarActionButton.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/nice-bugs-knock.md diff --git a/.changeset/nice-bugs-knock.md b/.changeset/nice-bugs-knock.md new file mode 100644 index 0000000000..5597e93efd --- /dev/null +++ b/.changeset/nice-bugs-knock.md @@ -0,0 +1,5 @@ +--- +"@comet/admin": patch +--- + +Fix `onClick` and other props not being passed to the icon version of some button components diff --git a/packages/admin/admin/src/common/toolbar/actions/ToolbarActionButton.tsx b/packages/admin/admin/src/common/toolbar/actions/ToolbarActionButton.tsx index 20a506fff7..8f969a6c54 100644 --- a/packages/admin/admin/src/common/toolbar/actions/ToolbarActionButton.tsx +++ b/packages/admin/admin/src/common/toolbar/actions/ToolbarActionButton.tsx @@ -78,7 +78,7 @@ export const ToolbarActionButton = (props: ToolbarActionButtonProps) => { return useIconButton && icon ? ( - + {icon}