import { Icon, close } from '@wordpress/icons' import { __ } from '@wordpress/i18n' import { Dialog, Transition } from '@headlessui/react' import { Fragment, forwardRef, useRef } from '@wordpress/element' import { useGlobalStore } from '../../state/GlobalState' export const SplitModal = forwardRef( ({ onClose, isOpen, invertedButtonColor, children }, initialFocus) => { const focusBackup = useRef(null) const defaultClose = useGlobalStore((state) => state.removeAllModals) onClose = onClose ?? defaultClose return (
{children[0]}
{children[1]}
) }, )