mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-14 13:44:37 +08:00
21 lines
660 B
Go
21 lines
660 B
Go
package views
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/theme"
|
|
"fyne.io/fyne/v2/widget"
|
|
"github.com/gravitl/netmaker/netclient/gui/components"
|
|
)
|
|
|
|
// GetConfirmation - displays a confirmation message
|
|
func GetConfirmation(msg string, onCancel, onConfirm func()) fyne.CanvasObject {
|
|
return container.NewGridWithColumns(1,
|
|
container.NewCenter(widget.NewLabel(msg)),
|
|
container.NewCenter(
|
|
container.NewHBox(
|
|
components.ColoredIconButton("Confirm", theme.ConfirmIcon(), onConfirm, components.Gravitl_color),
|
|
components.ColoredIconButton("Cancel", theme.CancelIcon(), onCancel, components.Danger_color),
|
|
)),
|
|
)
|
|
}
|