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