Skip to content

Commit

Permalink
PostTaxonomiesFlatTermSelector: Restore space between tag list and mo…
Browse files Browse the repository at this point in the history
…st used tags
  • Loading branch information
t-hamano committed Oct 29, 2024
1 parent 26123cd commit eeb82d3
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
* WordPress dependencies
*/
import { __, _x, sprintf } from '@wordpress/i18n';
import { useEffect, useMemo, useState } from '@wordpress/element';
import { FormTokenField, withFilters } from '@wordpress/components';
import { Fragment, useEffect, useMemo, useState } from '@wordpress/element';
import {
FormTokenField,
withFilters,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { useSelect, useDispatch } from '@wordpress/data';
import deprecated from '@wordpress/deprecated';
import { store as coreStore } from '@wordpress/core-data';
Expand Down Expand Up @@ -288,8 +292,15 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
singularName
);

const Wrapper = ( { children } ) =>
__nextHasNoMarginBottom ? (
<VStack spacing={ 3 }>{ children }</VStack>
) : (
<Fragment>{ children }</Fragment>
);

return (
<>
<Wrapper>
<FormTokenField
__next40pxDefaultSize
value={ values }
Expand All @@ -306,7 +317,7 @@ export function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
/>
<MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />
</>
</Wrapper>
);
}

Expand Down

0 comments on commit eeb82d3

Please sign in to comment.