woocommerce/plugins/woocommerce-admin/client/task-lists/setup-task-list/footer-slot/footer-slot.tsx

27 lines
560 B
TypeScript
Raw Normal View History

/**
* External dependencies
*/
import { useSlot } from '@woocommerce/experimental';
/**
* Internal dependencies
*/
import {
EXPERIMENTAL_WC_TASKLIST_FOOTER_SLOT_NAME,
ExperimentalWooTaskListFooterItem,
} from './utils';
export const ExperimentalWooTaskListFooter = () => {
const slot = useSlot( EXPERIMENTAL_WC_TASKLIST_FOOTER_SLOT_NAME );
const hasFills = Boolean( slot?.fills?.length );
if ( ! hasFills ) {
return null;
}
return (
<div className="woocommerce-tasklist__footer">
<ExperimentalWooTaskListFooterItem.Slot />
</div>
);
};