Alert Dialog
Demo
Props
Prop | Type | Description |
---|---|---|
trigger | React.ReactNode (optional) | The element that triggers the AlertDialog to open. |
title | string (optional) | The title of the AlertDialog. |
description | string (optional) | The description or main content of the AlertDialog. |
cancel | string (optional) | Text for the cancel button. |
confirm | string (optional) | Text for the confirm button. |
onConfirm | () => void (optional) | Callback function that triggers when the confirm button is clicked. |
classNames | { [key: string]: string } (optional) | Custom class names for various AlertDialog components. |
Styles
This component allows for custom styles via the classNames
prop:
trigger
: CSS class for styling the trigger element.content
: CSS class for styling the main content of the alert dialog.header
: CSS class for styling the header.title
: CSS class for styling the title.description
: CSS class for styling the description.footer
: CSS class for styling the footer.cancel
: CSS class for styling the cancel button.confirm
: CSS class for styling the confirm button.