Skip to content

Commit

Permalink
Update the template creation modal (#32427)
Browse files Browse the repository at this point in the history
* Update copy and styling

* Formatting

* Two column layout

* formatting

* Polish.

Co-authored-by: jasmussen <joen@automattic.com>
  • Loading branch information
2 people authored and youknowriad committed Jun 14, 2021
1 parent ad119ad commit 6c6a656
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
25 changes: 17 additions & 8 deletions packages/edit-post/src/components/sidebar/template/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function PostTemplateActions() {
</div>
{ isModalOpen && (
<Modal
title={ __( 'Create a custom template' ) }
title={ __( 'Create custom template' ) }
closeLabel={ __( 'Close' ) }
onRequestClose={ () => {
setIsModalOpen( false );
Expand Down Expand Up @@ -98,18 +98,27 @@ function PostTemplateActions() {
setIsModalOpen( false );
} }
>
<TextControl
label={ __( 'Name' ) }
value={ title }
onChange={ setTitle }
/>
<Flex align="flex-start" gap={ 8 }>
<FlexItem>
<TextControl
label={ __( 'Name' ) }
value={ title }
onChange={ setTitle }
help={ __(
'Describe the purpose of the template, e.g. "Full Width". Custom templates can be applied to any post or page.'
) }
/>
</FlexItem>
</Flex>

<Flex
className="edit-post-post-template__modal-actions"
className="edit-post-template__modal-actions"
justify="flex-end"
expanded={ false }
>
<FlexItem>
<Button
isSecondary
isTertiary
onClick={ () => {
setIsModalOpen( false );
setTitle( '' );
Expand Down
28 changes: 27 additions & 1 deletion packages/edit-post/src/components/sidebar/template/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
.edit-post-template__modal {
.components-base-control {
@include break-medium() {
width: $grid-unit * 40;
}
}

.components-modal__header {
border-bottom: none;
}

.components-modal__content::before {
margin-bottom: $grid-unit-05;
}
}

.edit-post-template__modal-actions {
padding-top: $grid-unit-15;
margin-top: $grid-unit-15;
}

.edit-post-template-modal__tip {
padding: $grid-unit-20 $grid-unit-30;
background: $gray-100;
border-radius: $radius-block-ui;

@include break-medium() {
width: $grid-unit * 30;
}
}

.edit-post-template__actions {
Expand Down

0 comments on commit 6c6a656

Please sign in to comment.