From cd8aaf8a456d83f546aedaee35bacd1f330e2143 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Mon, 15 Nov 2021 09:58:26 +1000 Subject: [PATCH] ToolsPanel: Allow additional props on ToolsPanel (#36428) * Allow additional props on ToolsPanel * Add changelog --- packages/components/CHANGELOG.md | 4 ++++ .../components/src/tools-panel/tools-panel/component.tsx | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index fc7579d747cc7f..b297935774dbd5 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Experimental + +- Reinstated the ability to pass additional props to the `ToolsPanel` ([36428](https://github.com/WordPress/gutenberg/pull/36428)). + ## 19.0.1 (2021-11-07) ### Experimental diff --git a/packages/components/src/tools-panel/tools-panel/component.tsx b/packages/components/src/tools-panel/tools-panel/component.tsx index 5492e193417a05..f7f16240cea184 100644 --- a/packages/components/src/tools-panel/tools-panel/component.tsx +++ b/packages/components/src/tools-panel/tools-panel/component.tsx @@ -24,14 +24,11 @@ const ToolsPanel = ( panelContext, resetAllItems, toggleItem, - className, + ...toolsPanelProps } = useToolsPanel( props ); - // Props are not directly passed through to avoid exposing Grid props - // until agreement has been reached on how ToolsPanel layout should be - // handled. return ( - +