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