woocommerce/plugins/woocommerce-admin/client/tasks/fills/components/load-sample-product-confirm...

47 lines
1.1 KiB
TypeScript
Raw Normal View History

2022-05-24 07:00:17 +00:00
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Button, Modal } from '@wordpress/components';
import { Text } from '@woocommerce/experimental';
/**
* Internal dependencies
*/
import './load-sample-product-confirm-modal.scss';
type Props = {
onCancel: () => void;
onImport: () => void;
2022-05-24 07:00:17 +00:00
};
export const LoadSampleProductConfirmModal: React.VFC< Props > = ( {
onCancel,
onImport,
2022-05-24 07:00:17 +00:00
} ) => {
return (
<Modal
className="woocommerce-products-load-sample-product-confirm-modal"
2022-05-24 09:24:54 +00:00
title={ __( 'Load sample products', 'woocommerce' ) }
2022-05-24 07:00:17 +00:00
onRequestClose={ onCancel }
>
<Text className="woocommerce-confirmation-modal__message">
{ __(
2022-05-24 09:24:54 +00:00
"We'll import images from woocommerce.com to set up your sample products.",
'woocommerce'
2022-05-24 07:00:17 +00:00
) }
</Text>
<div className="woocommerce-confirmation-modal-actions">
<Button isSecondary onClick={ onCancel }>
2022-05-24 08:56:16 +00:00
{ __( 'Cancel', 'woocommerce' ) }
2022-05-24 07:00:17 +00:00
</Button>
<Button isPrimary onClick={ onImport }>
2022-05-24 08:56:16 +00:00
{ __( 'Import sample products', 'woocommerce' ) }
2022-05-24 07:00:17 +00:00
</Button>
</div>
</Modal>
);
};
export default LoadSampleProductConfirmModal;