Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing DialogPrimitive.Portal in Dialog demos #26

Closed
dcos96038 opened this issue Dec 18, 2022 · 1 comment
Closed

Missing DialogPrimitive.Portal in Dialog demos #26

dcos96038 opened this issue Dec 18, 2022 · 1 comment

Comments

@dcos96038
Copy link

Hi, I'm new to the library, I was learning how to use radix + tailwind and discovered an issue with the dialog demo.
dialogbug
There is a side effect when using flex + gap because the Transitions aren't wrapped with DialogPrimitive.Portal component.

<DialogPrimitive.Root open={isOpen} onOpenChange={setIsOpen}>
      <DialogPrimitive.Trigger asChild>
        <Button>Click</Button>
      </DialogPrimitive.Trigger>
      <DialogPrimitive.Portal> // <---- Here!
          <Transition.Root show={isOpen}>
            <Transition.Child
              as={Fragment}
              enter="ease-out duration-300"
              enterFrom="opacity-0"
              enterTo="opacity-100"
              leave="ease-in duration-200"
              leaveFrom="opacity-100"
              leaveTo="opacity-0"
            >

Thank you for the library, and the demos are fantastic!

@ecklf
Copy link
Owner

ecklf commented Dec 19, 2022

Good to know, I'll update the examples (you might need the forceMount prop when using the Transition)

@ecklf ecklf closed this as completed Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants