Don't require confirmation dialog actions (#85)

We already have this default for `AlertState`, so let's do the same for
`ConfirmationDialogState`.
This commit is contained in:
Stephen Celis 2023-03-05 16:34:15 -08:00 committed by GitHub
parent ff448510c5
commit 92c82d73a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ public struct ConfirmationDialogState<Action>: Identifiable {
public init(
titleVisibility: ConfirmationDialogStateTitleVisibility,
title: () -> TextState,
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>],
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>] = { [] },
message: (() -> TextState)? = nil
) {
self.init(
@ -170,7 +170,7 @@ public struct ConfirmationDialogState<Action>: Identifiable {
/// - message: The message for the dialog.
public init(
title: () -> TextState,
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>],
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>] = { [] },
message: (() -> TextState)? = nil
) {
self.init(
@ -200,8 +200,8 @@ public struct ConfirmationDialogState<Action>: Identifiable {
///
/// See `SwiftUI.Visibility` for more information.
public enum ConfirmationDialogStateTitleVisibility {
/// The element may be visible or hidden depending on the policies of the
/// component accepting the visibility configuration.
/// The element may be visible or hidden depending on the policies of the component accepting the
/// visibility configuration.
///
/// See `SwiftUI.Visibility.automatic` for more information.
case automatic