Sections
Components
- AlertBanner
- AlertDialog
- Alert
- Avatar
- Badge
- Breadcrumb
- Button
- CalendarIcon
- CellLayout
- CellLink
- Checkbox
- Collapse
- ContentSwitcher
- ControlLabel
- DatePicker
- Dialog
- Divider
- Drawer
- EmptyCell
- EmptyState
- Empty
- ErrorOverlay
- FilterBar
- FilterChips
- Flex
- GridLayout
- HumanisedDate
- Icon
- InputDuration
- InputField
- Input
- Label
- Loader
- MoreActions
- NumberInput
- OutsideClickHandler
- PageLoader
- Page
- Popconfirm
- Popover
- ProgressPie
- Progress
- RadioButtonGroup
- RadioGroup
- Radio
- RelativeTime
- Resizable
- SearchInput
- Select
- SkeletonText
- Skeleton
- Space
- SquadAvatarList
- StatusPicker
- Stepper
- Switch
- TableLight
- Tabs
- Tag
- Text
- Textarea
- Toast
- Tooltip
- TriggerSelect
- Upload
import { AlertDialog, Button } from "@/rl-ui";
<AlertDialog
title="Delete project?"
description="This cannot be undone."
variant="danger"
trigger={<Button variant="danger">Delete</Button>}
/>Examples#
Variants#
import { AlertDialog, Button } from "@/rl-ui";
<>
<AlertDialog variant="basic" title="Continue?" trigger={<Button>Basic</Button>} />
<AlertDialog variant="success" title="Publish?" trigger={<Button variant="success">Publish</Button>} />
<AlertDialog variant="danger" title="Delete?" trigger={<Button variant="danger">Delete</Button>} />
</>API#
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "basic" | "success" | "danger" | "basic" | Tone for the confirm action. |
width | number | 512 | Dialog width in px. |
title | ReactNode | — | Prompt title. |
description | ReactNode | — | Supporting copy. |
trigger | ReactNode | — | Element that opens the dialog. |
open | boolean | — | Controlled open state. |
onOpenChange | (open: boolean) => void | — | Open change handler. |