Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Mar 29, 2024
1 parent 5f39dd1 commit d7823cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/edit-site/src/components/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ export const postRevisionsAction = {
export const renamePostAction = {
id: 'rename-post',
label: __( 'Rename' ),
isEligible( post ) {
return post.status !== 'trash';
},
RenderModal: ( { items, closeModal } ) => {
const [ item ] = items;
const originalTitle = decodeEntities(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,25 @@ export const renameTemplateAction = {
<VStack spacing="5">
<TextControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Name' ) }
value={ editedTitle }
onChange={ setEditedTitle }
required
/>
<HStack justify="right">
<Button variant="tertiary" onClick={ closeModal }>
<Button
variant="tertiary"
onClick={ closeModal }
__next40pxDefaultSize
>
{ __( 'Cancel' ) }
</Button>
<Button variant="primary" type="submit">
<Button
variant="primary"
type="submit"
__next40pxDefaultSize
>
{ __( 'Save' ) }
</Button>
</HStack>
Expand Down

0 comments on commit d7823cb

Please sign in to comment.