Skip to content

Commit 92c82d7

Browse files
authored
Don't require confirmation dialog actions (pointfreeco#85)
We already have this default for `AlertState`, so let's do the same for `ConfirmationDialogState`.
1 parent ff44851 commit 92c82d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/_SwiftUINavigationState/ConfirmationDialogState.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public struct ConfirmationDialogState<Action>: Identifiable {
150150
public init(
151151
titleVisibility: ConfirmationDialogStateTitleVisibility,
152152
title: () -> TextState,
153-
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>],
153+
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>] = { [] },
154154
message: (() -> TextState)? = nil
155155
) {
156156
self.init(
@@ -170,7 +170,7 @@ public struct ConfirmationDialogState<Action>: Identifiable {
170170
/// - message: The message for the dialog.
171171
public init(
172172
title: () -> TextState,
173-
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>],
173+
@ButtonStateBuilder<Action> actions: () -> [ButtonState<Action>] = { [] },
174174
message: (() -> TextState)? = nil
175175
) {
176176
self.init(
@@ -200,8 +200,8 @@ public struct ConfirmationDialogState<Action>: Identifiable {
200200
///
201201
/// See `SwiftUI.Visibility` for more information.
202202
public enum ConfirmationDialogStateTitleVisibility {
203-
/// The element may be visible or hidden depending on the policies of the
204-
/// component accepting the visibility configuration.
203+
/// The element may be visible or hidden depending on the policies of the component accepting the
204+
/// visibility configuration.
205205
///
206206
/// See `SwiftUI.Visibility.automatic` for more information.
207207
case automatic

0 commit comments

Comments
 (0)