Skip to content

Commit

Permalink
Add prop and VStack to additional component
Browse files Browse the repository at this point in the history
  • Loading branch information
brookewp committed Jan 18, 2023
1 parent 74e2a4a commit 749debf
Showing 1 changed file with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
TextControl,
TreeSelect,
withFilters,
__experimentalVStack as VStack,
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import { useDebounce } from '@wordpress/compose';
Expand Down Expand Up @@ -415,6 +416,7 @@ export function HierarchicalTermSelector( { slug } ) {
<>
{ showFilter && (
<TextControl
__nextHasNoMarginBottom
className="editor-post-taxonomies__hierarchical-terms-filter"
label={ filterLabel }
value={ filterValue }
Expand Down Expand Up @@ -443,22 +445,25 @@ export function HierarchicalTermSelector( { slug } ) {
) }
{ showForm && (
<form onSubmit={ onAddTerm }>
<TextControl
className="editor-post-taxonomies__hierarchical-terms-input"
label={ newTermLabel }
value={ formName }
onChange={ onChangeFormName }
required
/>
{ !! availableTerms.length && (
<TreeSelect
label={ parentSelectLabel }
noOptionLabel={ noParentOption }
onChange={ onChangeFormParent }
selectedId={ formParent }
tree={ availableTermsTree }
<VStack>
<TextControl
__nextHasNoMarginBottom
className="editor-post-taxonomies__hierarchical-terms-input"
label={ newTermLabel }
value={ formName }
onChange={ onChangeFormName }
required
/>
) }
{ !! availableTerms.length && (
<TreeSelect
label={ parentSelectLabel }
noOptionLabel={ noParentOption }
onChange={ onChangeFormParent }
selectedId={ formParent }
tree={ availableTermsTree }
/>
) }
</VStack>
<Button
variant="secondary"
type="submit"
Expand Down

0 comments on commit 749debf

Please sign in to comment.