Add "Start from scratch" to the template selector

MAILPOET-6333
This commit is contained in:
Oluwaseun Olorunsola
2024-12-02 14:51:34 +01:00
committed by Rostislav Wolný
parent f952ee0d1f
commit 46c8ae94bc

View File

@ -6,7 +6,11 @@ import {
Modal,
__experimentalHStack as HStack, // eslint-disable-line
Button,
Flex,
FlexItem,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { Async } from './async';
import { usePreviewTemplates } from '../../hooks';
import { storeName, TemplatePreview } from '../../store';
@ -113,6 +117,17 @@ export function SelectTemplateModal( { onSelectCallback } ) {
</div>
) ) }
</div>
<Flex justify="flex-end">
<FlexItem>
<Button
variant="tertiary"
onClick={ () => handleCloseWithoutSelection() }
>
{ __( 'Start from scratch', 'mailpoet' ) }
</Button>
</FlexItem>
</Flex>
</div>
</div>
</Modal>