Skip to content

Commit

Permalink
Site Editor: polish add template modal style (#48445)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Feb 27, 2023
1 parent d116f9f commit 3faa015
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
SearchControl,
TextHighlight,
__experimentalText as Text,
__experimentalVStack as VStack,
__unstableComposite as Composite,
__unstableUseCompositeState as useCompositeState,
__unstableCompositeItem as CompositeItem,
Expand Down Expand Up @@ -158,9 +159,12 @@ function SuggestionList( { entityForSuggestions, onSelect } ) {
</Composite>
) }
{ debouncedSearch && ! suggestions?.length && (
<p className="edit-site-custom-template-modal__no-results">
<Text
as="p"
className="edit-site-custom-template-modal__no-results"
>
{ labels.not_found }
</p>
</Text>
) }
</>
);
Expand Down Expand Up @@ -188,12 +192,12 @@ function AddCustomTemplateModal( {
>
{ isCreatingTemplate && <TemplateActionsLoadingScreen /> }
{ ! showSearchEntities && (
<>
<p>
<VStack spacing={ 4 }>
<Text as="p">
{ __(
'Select whether to create a single template for all items or a specific one.'
) }
</p>
</Text>
<Flex
className={ `${ baseCssClass }__contents` }
gap="4"
Expand Down Expand Up @@ -245,20 +249,20 @@ function AddCustomTemplateModal( {
</Text>
</FlexItem>
</Flex>
</>
</VStack>
) }
{ showSearchEntities && (
<>
<p>
<VStack spacing={ 4 }>
<Text as="p">
{ __(
'This template will be used only for the specific item chosen.'
) }
</p>
</Text>
<SuggestionList
entityForSuggestions={ entityForSuggestions }
onSelect={ onSelect }
/>
</>
</VStack>
) }
</Modal>
);
Expand Down
5 changes: 0 additions & 5 deletions packages/edit-site/src/components/add-new-template/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
}

.edit-site-custom-template-modal__suggestions_list {
margin-top: $grid-unit-20;

@include break-small() {
height: 232px;
overflow: scroll;
Expand Down Expand Up @@ -130,11 +128,8 @@
border: 1px solid $gray-400;
border-radius: $radius-block-ui;
padding: $grid-unit-20;
margin-bottom: 0;
margin-top: $grid-unit-20;
}


.edit-site-custom-generic-template__modal {
.components-base-control {
@include break-medium() {
Expand Down

0 comments on commit 3faa015

Please sign in to comment.