diff --git a/packages/block-library/src/query/edit/inspector-controls/author-control.js b/packages/block-library/src/query/edit/inspector-controls/author-control.js index 5b154346f0a769..1d33ae96f13e80 100644 --- a/packages/block-library/src/query/edit/inspector-controls/author-control.js +++ b/packages/block-library/src/query/edit/inspector-controls/author-control.js @@ -76,6 +76,7 @@ function AuthorControl( { value, onChange } ) { suggestions={ authorsInfo.names } onChange={ onAuthorChange } __experimentalShowHowTo={ false } + __next40pxDefaultSize /> ); } diff --git a/packages/block-library/src/query/edit/inspector-controls/index.js b/packages/block-library/src/query/edit/inspector-controls/index.js index e71b2d09af4b81..4c3500f4bd23fa 100644 --- a/packages/block-library/src/query/edit/inspector-controls/index.js +++ b/packages/block-library/src/query/edit/inspector-controls/index.js @@ -7,6 +7,8 @@ import { SelectControl, RangeControl, ToggleControl, + __experimentalToggleGroupControl as ToggleGroupControl, + __experimentalToggleGroupControlOption as ToggleGroupControlOption, Notice, __experimentalToolsPanel as ToolsPanel, __experimentalToolsPanelItem as ToolsPanelItem, @@ -101,6 +103,10 @@ export default function QueryInspectorControls( props ) { const showInheritControl = isControlAllowed( allowedControls, 'inherit' ); const showPostTypeControl = ! inherit && isControlAllowed( allowedControls, 'postType' ); + const postTypeControlLabel = __( 'Content type' ); + const postTypeControlHelp = __( + 'WordPress contains different types of content you can filter by. Posts and pages are the default types, but plugins could add more.' + ); const showColumnsControl = false; const showOrderControl = ! inherit && isControlAllowed( allowedControls, 'order' ); @@ -152,22 +158,42 @@ export default function QueryInspectorControls( props ) { } /> ) } - { showPostTypeControl && ( - - ) } + { showPostTypeControl && + ( postTypesSelectOptions.length > 2 ? ( + + ) : ( + + { postTypesSelectOptions.map( ( option ) => ( + + ) ) } + + ) ) } + { showColumnsControl && ( <> @@ -262,6 +288,7 @@ export default function QueryInspectorControls( props ) { > );