From 9244606cdc10c01672b6878c178680059d951aaa Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Wed, 29 Aug 2018 14:22:25 +0100 Subject: [PATCH] Avoid changing the public API of the warning component to avoid Backwards compatibility breakage --- .../src/components/block-list/block-invalid-warning.js | 2 +- packages/editor/src/components/warning/index.js | 6 +++--- packages/editor/src/components/warning/test/index.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/components/block-list/block-invalid-warning.js b/packages/editor/src/components/block-list/block-invalid-warning.js index b0341bd5a6214d..7fbbf5ea95a80c 100644 --- a/packages/editor/src/components/block-list/block-invalid-warning.js +++ b/packages/editor/src/components/block-list/block-invalid-warning.js @@ -20,7 +20,7 @@ function BlockInvalidWarning( { convertToHTML, convertToBlocks, convertToClassic return ( { __( 'Convert to Blocks' ) } , diff --git a/packages/editor/src/components/warning/index.js b/packages/editor/src/components/warning/index.js index ac68bf0f57c6c1..52a1b410431692 100644 --- a/packages/editor/src/components/warning/index.js +++ b/packages/editor/src/components/warning/index.js @@ -10,15 +10,15 @@ import { Children } from '@wordpress/element'; import { Dropdown, IconButton, MenuGroup, MenuItem } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -function Warning( { className, primaryActions, children, secondaryActions } ) { +function Warning( { className, actions, children, secondaryActions } ) { return (

{ children }

- { Children.count( primaryActions ) > 0 && ( + { Children.count( actions ) > 0 && (
- { Children.map( primaryActions, ( action, i ) => ( + { Children.map( actions, ( action, i ) => ( { action } diff --git a/packages/editor/src/components/warning/test/index.js b/packages/editor/src/components/warning/test/index.js index 9ef516e80dd60b..71276f17078eb3 100644 --- a/packages/editor/src/components/warning/test/index.js +++ b/packages/editor/src/components/warning/test/index.js @@ -24,7 +24,7 @@ describe( 'Warning', () => { } ); it( 'should show child error message element', () => { - const wrapper = shallow( }>Message ); + const wrapper = shallow( }>Message ); const actions = wrapper.find( '.editor-warning__actions' ); const action = actions.childAt( 0 );