mirror of
https://github.com/VladimirMarkelov/clui.git
synced 2025-04-28 13:48:50 +08:00
Added alert dialog
This commit is contained in:
parent
cd3c9588ac
commit
46578847cb
10
dialog.go
10
dialog.go
@ -31,7 +31,15 @@ type SelectDialog struct {
|
|||||||
onClose func()
|
onClose func()
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewConfirmationDialog creates new confirmation dialog.
|
// CreateAlertDialog creates a new alert dialog.
|
||||||
|
// title is a dialog title
|
||||||
|
// message is a text inside dialog for user to be notified of a fact
|
||||||
|
// button is a title for button inside dialog.
|
||||||
|
func CreateAlertDialog(title, message string, button string) *ConfirmationDialog {
|
||||||
|
return CreateConfirmationDialog(title, message, []string{button}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateConfirmationDialog creates new confirmation dialog.
|
||||||
// c is a composer that manages the dialog
|
// c is a composer that manages the dialog
|
||||||
// title is a dialog title
|
// title is a dialog title
|
||||||
// question is a text inside dialog for user to explain what happens
|
// question is a text inside dialog for user to explain what happens
|
||||||
|
Loading…
x
Reference in New Issue
Block a user