Skip to content

Commit

Permalink
QueryControls: Default to new 40px size (#64457)
Browse files Browse the repository at this point in the history
* QueryControls: Default to new 40px size

* Add changelog

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored and getdave committed Aug 14, 2024
1 parent f6c8f6d commit 97df6a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Enhancements

- `Composite`: improve Storybook examples and add interactive controls ([#64397](https://github.com/WordPress/gutenberg/pull/64397)).
- `QueryControls`: Default to new 40px size ([#64457](https://github.com/WordPress/gutenberg/pull/64457)).
- `TimePicker`: add `hideLabelFromVision` prop ([#64267](https://github.com/WordPress/gutenberg/pull/64267)).
- `DropdownMenuV2`: adopt elevation scale ([#64432](https://github.com/WordPress/gutenberg/pull/64432)).

Expand Down
11 changes: 5 additions & 6 deletions packages/components/src/query-controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function isMultipleCategorySelection(
* ```
*/
export function QueryControls( {
__next40pxDefaultSize = false,
authorList,
selectedAuthorId,
numberOfItems,
Expand All @@ -82,7 +81,7 @@ export function QueryControls( {
onOrderChange && onOrderByChange && (
<SelectControl
__nextHasNoMarginBottom
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-order-select"
label={ __( 'Order by' ) }
value={
Expand Down Expand Up @@ -137,7 +136,7 @@ export function QueryControls( {
props.categoriesList &&
props.onCategoryChange && (
<CategorySelect
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-category-select"
categoriesList={ props.categoriesList }
label={ __( 'Category' ) }
Expand All @@ -150,7 +149,7 @@ export function QueryControls( {
props.categorySuggestions &&
props.onCategoryChange && (
<FormTokenField
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
__nextHasNoMarginBottom
key="query-controls-categories-select"
label={ __( 'Categories' ) }
Expand All @@ -174,7 +173,7 @@ export function QueryControls( {
),
onAuthorChange && (
<AuthorSelect
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-author-select"
authorList={ authorList }
label={ __( 'Author' ) }
Expand All @@ -186,7 +185,7 @@ export function QueryControls( {
onNumberOfItemsChange && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-range-control"
label={ __( 'Number of items' ) }
value={ numberOfItems }
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/query-controls/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ type BaseQueryControlsProps = {
* Start opting into the larger default height that will become the
* default size in a future version.
*
* @default false
* @deprecated Default behavior since WP 6.7. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
};
Expand Down

0 comments on commit 97df6a7

Please sign in to comment.