woocommerce/plugins/woocommerce-admin/client/task-lists/setup-task-list/components/task-list-completed.tsx

55 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* External dependencies
*/
import clsx from 'clsx';
import { Button, Card, CardHeader } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import HeaderImage from '../assets/task-list-completed.svg';
export const TaskListCompleted = ( {
hideTasks,
keepTasks,
}: {
hideTasks: () => void;
keepTasks: () => void;
} ) => {
return (
<>
<div
className={ clsx(
'woocommerce-task-dashboard__container setup-task-list'
) }
>
<Card
size="large"
className="woocommerce-task-card woocommerce-homescreen-card completed"
>
<CardHeader size="medium">
<div className="wooocommerce-task-card__header">
<img src={ HeaderImage } alt="Completed" />
<h2>
{ __(
'Youve completed store setup',
'woocommerce'
) }
</h2>
<Button isSecondary onClick={ keepTasks }>
{ __( 'Keep list', 'woocommerce' ) }
</Button>
<Button isPrimary onClick={ hideTasks }>
{ __( 'Hide this list', 'woocommerce' ) }
</Button>
</div>
</CardHeader>
</Card>
</div>
</>
);
};
export default TaskListCompleted;