diff --git a/packages/react-aria-components/docs/Dialog.mdx b/packages/react-aria-components/docs/Dialog.mdx index a8c15ca0df6..4ab7d8972f3 100644 --- a/packages/react-aria-components/docs/Dialog.mdx +++ b/packages/react-aria-components/docs/Dialog.mdx @@ -50,22 +50,20 @@ import {DialogTrigger, Modal, Dialog, Button, Heading, TextField, Label, Input} - {({close}) => ( -
- Sign up - - - - - - - - - -
- )} +
+ Sign up + + + + + + + + + +
@@ -113,7 +111,7 @@ building fully accessible custom dialogs from scratch is very difficult and erro -A dialog consists of a container element and an optional title. It can be placed within a [Modal](Modal.html) or [Popover](Popover.html), to create modal dialogs, popovers, and other types of overlays. A `DialogTrigger` can be used to open a dialog overlay in response to a user action, e.g. clicking a button. +A dialog consists of a container element and an optional title and close button. It can be placed within a [Modal](Modal.html) or [Popover](Popover.html), to create modal dialogs, popovers, and other types of overlays. A `DialogTrigger` can be used to open a dialog overlay in response to a user action, e.g. clicking a button. ```tsx import {DialogTrigger, Modal, Dialog, Button, Heading} from 'react-aria-components'; @@ -123,6 +121,7 @@ import {DialogTrigger, Modal, Dialog, Button, Heading} from 'react-aria-componen + @@ -199,6 +198,17 @@ Alert dialogs are a special type of dialog meant to present a prompt that the us A `` accepts all HTML attributes. +### Button + +A ` - {({close}) => ( -
- Sign up - - - - - - - - - -
- )} +
+ Sign up + + + + + + + + + +
@@ -209,11 +207,9 @@ By default, modals can be closed by pressing the Escape key - {({close}) => <> - Notice -

You must close this dialog using the button below.

- - } + Notice +

You must close this dialog using the button below.

+
@@ -231,11 +227,9 @@ import {ModalOverlay} from 'react-aria-components'; - {({close}) => <> - Notice -

This is a modal with a custom modal overlay.

- - } + Notice +

This is a modal with a custom modal overlay.

+