moonstone/ Dialog
Moonstone styled modal dialog components.
import Dialog from '@enact/moonstone/Dialog';Members
DialogComponent
A modal dialog component, ready to use in Moonstone applications.
Dialog may be used to interrupt a workflow to receive feedback from the user. The dialong
consists of a title, a subtitle, a message, and an area for additional
buttons.
Usage:
<Dialog
open={this.state.open}
showCloseButton
title="An Important Dialog"
titleBelow="Some important context to share about the purpose"
>
<BodyText>You can include other Moonstone components here. </BodyText>
<buttons>
<Button>Button 1</Button>
<Button>Button 2</Button>
</buttons>
</Dialog>import Dialog from '@enact/moonstone/Dialog';DialogBaseComponent
A modal dialog component.
This component is most often not used directly but may be composed within another component as it is within Dialog.
import {DialogBase} from '@enact/moonstone/Dialog';Properties
Buttons to be included within the header of the component.
Typically, these buttons would be used to close or take action on the dialog.
The contents of the body of the component.
Disables animating the dialog on or off screen.
Default: falseOmits the dividing line between the header and body of the component.
Default: falseCalled when the user requests to close the dialog.
These actions include pressing the cancel key or tapping on the close button. It is the responsibility of the callback to set the
openproperty tofalse.Called after the transition to hide the dialog has finished.
Opens the dialog.
Default: falseThe types of scrim shown behind the dialog.
Allowed values include:
'transparent'- The scrim is invisible but prevents pointer events for components below it.'translucent'- The scrim is visible and both obscures and prevents pointer events for components below it.'none'- No scrim is present and pointer events are allowed outside the dialog.
Default: 'translucent'Shows the close button within the component.
Default: falseThe primary text displayed within the header
The secondary text displayed below the
titlewithin the header.Will not display if
titleis not set.