diff --git a/packages/edit-site/src/components/page-templates-template-parts/actions.js b/packages/edit-site/src/components/page-templates-template-parts/actions.js index 7f9fff72660ff..3a84473f7c76a 100644 --- a/packages/edit-site/src/components/page-templates-template-parts/actions.js +++ b/packages/edit-site/src/components/page-templates-template-parts/actions.js @@ -1,7 +1,6 @@ /** * WordPress dependencies */ -import { backup, trash } from '@wordpress/icons'; import { __, sprintf, _n } from '@wordpress/i18n'; import { useDispatch } from '@wordpress/data'; import { useMemo, useState } from '@wordpress/element'; @@ -33,9 +32,7 @@ export function useResetTemplateAction() { return useMemo( () => ( { id: 'reset-template', - label: __( 'Reset' ), - isPrimary: true, - icon: backup, + label: __( 'Clear customizations' ), isEligible: isTemplateRevertable, supportsBulk: true, async callback( templates ) { @@ -112,8 +109,6 @@ export function useResetTemplateAction() { export const deleteTemplateAction = { id: 'delete-template', label: __( 'Delete' ), - isPrimary: true, - icon: trash, isEligible: isTemplateRemovable, supportsBulk: true, hideModalHeader: true, diff --git a/packages/edit-site/src/components/page-templates-template-parts/index.js b/packages/edit-site/src/components/page-templates-template-parts/index.js index c2f3af84abce8..e2b9bff335aa5 100644 --- a/packages/edit-site/src/components/page-templates-template-parts/index.js +++ b/packages/edit-site/src/components/page-templates-template-parts/index.js @@ -45,7 +45,7 @@ import { deleteTemplateAction, renameTemplateAction, } from './actions'; -import { postRevisionsAction } from '../actions'; +import { postRevisionsAction, useEditPostAction } from '../actions'; import usePatternSettings from '../page-patterns/use-pattern-settings'; import { unlock } from '../../lock-unlock'; import AddNewTemplatePart from './add-new-template-part'; @@ -339,8 +339,10 @@ export default function PageTemplatesTemplateParts( { postType } ) { }, [ records, view, fields ] ); const resetTemplateAction = useResetTemplateAction(); + const editTemplateAction = useEditPostAction(); const actions = useMemo( () => [ + editTemplateAction, resetTemplateAction, renameTemplateAction, postRevisionsAction,