Components
AlertDialog
Documentation for the AlertDialog component.
AlertDialog
Preview
The AlertDialog component is built with React Aria and styled using StyleX.
Import
import { AlertDialog } from '@moul-dev/ui';Usage
Here is a basic example of how to use the AlertDialog component:
import {
AlertDialog,
AlertDialogHeader,
AlertDialogBody,
AlertDialogFooter,
Button
} from '@moul-dev/ui';
export default function Example() {
return (
<AlertDialog>
<AlertDialogHeader>Deactivate Account</AlertDialogHeader>
<AlertDialogBody>
Are you sure you want to deactivate your account? This action cannot be undone.
</AlertDialogBody>
<AlertDialogFooter>
<Button variant="outline" onPress={() => {}}>Cancel</Button>
<Button variant="danger" onPress={() => {}}>Confirm</Button>
</AlertDialogFooter>
</AlertDialog>
);
}Props
AlertDialog Props
Prop
Type
Default className: react-aria-Dialog