Dialog

Summary
Simple

user-default

PBDialog(
            title: "This is some informative text",
            message: infoMessage,
            cancelButton: ("Cancel", closeToast),
            confirmButton: ("Okay", closeToast)
          )
Sizes

dialog-large

    @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
          )
Status

success


 PBDialog(
              title: "Success!",
              message: infoMessage,
              variant: .status(.success),
              isStacked: true,
              cancelButton: ("Cancel", closeToast),
              confirmButton: ("Okay", closeToast),
              size: .small
            )

Props

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