ConfirmationDialog
struct ConfirmationDialog : View
A custom view representing a confirmation dialog.
Use this view to display a dialog with a title, message, and two buttons: a cancel button and a retry button.
The dialog can be shown or hidden by setting the isActive
binding.
- title: The title of the dialog.
- message: The message displayed in the dialog.
- buttonTitle: The title of the retry button.
- cancelButtonTitle: The title of the cancel button.
- isActive: A binding that indicates whether the dialog is active or not.
- onTapCloseButton: A closure to be called when the cancel button is tapped.
- onTapRetryButton: A closure to be called when the retry button is tapped.
-
Title of the dialog
Declaration
Swift
var title: String
-
Message of the dialog
Declaration
Swift
var message: String
-
The title of the retry button
Declaration
Swift
var buttonTitle: String
-
The title of the cancel button
Declaration
Swift
var cancelButtonTitle: String
-
Bool value to indicate if the dialog is active or not
Declaration
Swift
@Binding var isActive: Bool { get nonmutating set }
-
Closure to be called when the cancel button is tapped
Declaration
Swift
var onTapCloseButton: () -> Void
-
Closure to be called when the retry button is tapped
Declaration
Swift
var onTapRetryButton: () -> Void
-
Declaration
Swift
var body: some View { get }