import React, { useState, Fragment } from 'react' import { Dialog, Menu, Portal, Transition } from '@headlessui/react' import { usePopper } from '../../playground-utils/hooks/use-popper' function classNames(...classes) { return classes.filter(Boolean).join(' ') } function resolveClass({ active, disabled }) { return classNames( 'flex justify-between w-full px-4 py-2 text-sm leading-5 text-left', active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', disabled && 'cursor-not-allowed opacity-50' ) } function Nested({ onClose, level = 0 }) { let [showChild, setShowChild] = useState(false) return ( <> {true && }

Level: {level}

{showChild && setShowChild(false)} level={level + 1} />}
) } export default function Home() { let [isOpen, setIsOpen] = useState(false) let [nested, setNested] = useState(false) let [trigger, container] = usePopper({ placement: 'bottom-end', strategy: 'fixed', modifiers: [{ name: 'offset', options: { offset: [0, 10] } }], }) return ( <> {nested && setNested(false)} />}
{/* This element is to trick the browser into centering the modal contents. */}
{/* Heroicon name: exclamation */}
Deactivate account

Are you sure you want to deactivate your account? All of your data will be permanently removed. This action cannot be undone.

{({ open }) => ( <> Choose a reason

Signed in as

tom@example.com

Account settings Support New feature (soon) License
Sign out
)}
) }