2021-11-19 11:47:48 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2023-05-30 13:39:19 +00:00
|
|
|
import { DrawerCloseButton } from '@woocommerce/base-components/drawer';
|
2023-06-19 15:44:37 +00:00
|
|
|
import { CartEventsProvider } from '@woocommerce/base-context';
|
2021-11-19 11:47:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2021-12-10 11:11:59 +00:00
|
|
|
import './inner-blocks/register-components';
|
2021-11-19 11:47:48 +00:00
|
|
|
|
2021-12-10 11:11:59 +00:00
|
|
|
type MiniCartContentsBlockProps = {
|
2023-04-14 07:48:55 +00:00
|
|
|
attributes: Record< string, unknown >;
|
2021-12-10 11:11:59 +00:00
|
|
|
children: JSX.Element | JSX.Element[];
|
2021-11-19 11:47:48 +00:00
|
|
|
};
|
|
|
|
|
2023-04-14 07:48:55 +00:00
|
|
|
export const MiniCartContentsBlock = (
|
|
|
|
props: MiniCartContentsBlockProps
|
|
|
|
): JSX.Element => {
|
2023-05-05 09:44:41 +00:00
|
|
|
const { children } = props;
|
2023-04-14 07:48:55 +00:00
|
|
|
|
2023-05-30 13:39:19 +00:00
|
|
|
return (
|
|
|
|
<>
|
2023-06-19 15:44:37 +00:00
|
|
|
<CartEventsProvider>
|
|
|
|
<DrawerCloseButton />
|
|
|
|
{ children }
|
|
|
|
</CartEventsProvider>
|
2023-05-30 13:39:19 +00:00
|
|
|
</>
|
|
|
|
);
|
2021-11-19 11:47:48 +00:00
|
|
|
};
|