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;
|
2022-05-24 07:07:03 +00:00
|
|
|
onImport: () => void;
|
2022-05-24 07:00:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const LoadSampleProductConfirmModal: React.VFC< Props > = ( {
|
|
|
|
onCancel,
|
2022-05-24 07:07:03 +00:00
|
|
|
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>
|
2022-05-24 07:07:03 +00:00
|
|
|
<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;
|