import {Dialog, Transition} from '@headlessui/react' import clsx from 'clsx' import {Fragment, ReactNode} from 'react' // From https://tailwindui.com/components/application-ui/overlays/modals export function RightModal(props: { children: ReactNode open: boolean setOpen: (open: boolean) => void noAutoFocus?: boolean className?: string }) { const {children, open, setOpen, className, noAutoFocus} = props return ( e.stopPropagation()} > {/* background cover */}
{/* Hack to capture focus b/c headlessui dialog always focuses first element and we don't want it to. */} {noAutoFocus &&
} {children}
) }