react-alert-dialog
Installation
$ yarn add @interop-ui/react-alert-dialog
$ npm install @interop-ui/react-alert-dialog
Usage
import * as React from 'react';
import {
AlertDialog,
AlertDialogTrigger,
AlertDialogOverlay,
AlertDialogContent,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogAction,
AlertDialogCancel,
} from '@interop-ui/react-alert-dialog';
function MyComponent() {
return (
<AlertDialog>
<AlertDialogTrigger>Delete everything</AlertDialogTrigger>
<AlertDialogOverlay />
<AlertDialogContent>
<AlertDialogTitle>Are you sure?</AlertDialogTitle>
<AlertDialogDescription>
This will do a very dangerous thing. Thar be dragons!
</AlertDialogDescription>
<AlertDialogAction onClick={deleteFiles}>Delete them</AlertDialogAction>
<AlertDialogCancel>Never mind</AlertDialogCancel>
</AlertDialogContent>
</AlertDialog>
);
}