@State private var presentSmallDialog: Bool = false
@State private var presentMediumDialog: Bool = false
@State private var presentLargeDialog: Bool = false
let infoMessage = "This is a message for informational purposes only and requires no action."
PBDialog(
title: "Large",
message: infoMessage,
variant: .default,
isStacked: false,
cancelButton: ("Cancel", {}),
confirmButton: ("Okay", {}),
size: .large
)
Name | Type | Description | Default | Values |
---|---|---|---|---|
content | Content |
Sets the View content | ||
title | String |
Sets title for dialog header | ||
message | String |
Sets dialog message | ||
variant | DialogVariant |
Changes variant of dialog | .default |
.default .status() |
isStacked | isStacked |
Changes whether the dialog buttons are stacked or inline | false |
true false |
cancelButton | Action |
Dismisses the dialog | ||
confirmButton | Action |
Confirms dialog message was received | ||
onClose | Action |
Starts action when dialog is closed | ||
size | DialogSize |
Determines size of dialog | .medium |
.small .medium large |
shouldCloseOnOverlay | Bool |
Determines if overlay should close | false |
true false |