Skip to content

Context scoping clarification #1091

Answered by jjenzz
luisorbaiceta asked this question in Help
Discussion options

You must be logged in to vote

@luisorbaiceta Thank you. Really pleased that you're having a poke around and look forward to seeing what you contribute!

Radix Primitives API is intentionally very open allowing for all sorts of compositions. For example:

<AlertDialog.Root>

  <Dialog.Root>
    <Dialog.Trigger />
    <Dialog.Content>
      <AlertDialog.Trigger /> {/* note the alert trigger in dialog content */}
    </Dialog.Content>
  </Dialog.Root>

  <AlertDialog.Content />
</AlertDialog.Root>

An issue arises here though...

The AlertDialog is a Dialog composition under the hood with additional functionality bound to meet AlertDialog requirements. This means that AlertDialog.Root is also a Dialog.Root so provides both D…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@hipstersmoothie
Comment options

@byteab
Comment options

@benoitgrelard
Comment options

@jjenzz
Comment options

@byteab
Comment options

Answer selected by luisorbaiceta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants