sandstone/ Alert
Sandstone styled modal Alert components.
import Alert from '@enact/sandstone/Alert';
Members
AlertComponent
A modal Alert component, ready to use in Sandstone applications.
Alert
may be used to interrupt a workflow to receive feedback from the user.
The dialog consists of a title, a message, and an area for additional
buttons.
Usage:
<Alert
open={this.state.open}
title="An Important Alert"
>
<image>
<AlertImage src={this.state.src} type="thumbnail" />
</image>
Body text for alert. Components may also be used here for greater customizability.
<buttons>
<Button>Button 1</Button>
<Button>Button 2</Button>
</buttons>
</Alert>
import Alert from '@enact/sandstone/Alert';
AlertBaseComponent
A modal Alert component.
This component is most often not used directly but may be composed within another component as it is within Alert.
import {AlertBase} from '@enact/sandstone/Alert';
Properties
Buttons to be included under the component.
Typically, up to 3 buttons are used.
The contents of the body of the component.
Only shown when
type="overlay"
. Ifchildren
is text-only, it will be wrapped with BodyText.Image to be included in the Alert component.
It is recommended to use the
AlertImage
component.Called when the user requests to close the Alert.
This also includes pressing the cancel key.
Called after the transition to hide the Alert has finished.
Opens the Alert.
Default: falseThe primary text displayed.
Only shown when
type="fullscreen"
.Type of popup.
There are two types:
fullscreen
- Full screen popupoverlay
- Popup in the center of the screen
Default: 'fullscreen'
AlertImageComponent
An image for use in an Alert.
import {AlertImage} from '@enact/sandstone/Alert';
Statics
String value or Object of values used to determine which image will appear for a specific component size.
Type of image to appear in the alert component. There are two types:
icon
- A small square sized image typethumbnail
- A common image type