Skip to content

Commit 2119d69

Browse files
committed
fix
1 parent b1d9744 commit 2119d69

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Sources/FullscreenPopup/View+popup.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ public extension View {
1717
isPresented: Binding<Bool>,
1818
duration nanoseconds: UInt64 = 350_000_000,
1919
animation: Animation = .spring(duration: 0.3, bounce: 0.25, blendDuration: 0.1),
20-
@ViewBuilder popup: @escaping (_ isPresented: Bool) -> Popup,
21-
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) }
20+
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) },
21+
@ViewBuilder content: @escaping (_ isPresented: Bool) -> Popup
2222
) -> some View {
2323
modifier(
2424
PopupModifier(
2525
isPresented: isPresented,
2626
duration: nanoseconds,
2727
animation: animation,
28-
popup: popup,
28+
popup: content,
2929
background: background
3030
)
3131
)
@@ -47,15 +47,15 @@ public extension View {
4747
isPresented: Binding<Bool>,
4848
duration nanoseconds: UInt64 = 350_000_000,
4949
animation: Animation = .spring(duration: 0.3, bounce: 0.25, blendDuration: 0.1),
50-
@ViewBuilder popup: @escaping () -> Popup,
51-
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) }
50+
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) },
51+
@ViewBuilder content: @escaping () -> Popup
5252
) -> some View {
5353
modifier(
5454
PopupModifier(
5555
isPresented: isPresented,
5656
duration: nanoseconds,
5757
animation: animation,
58-
popup: { _ in popup() },
58+
popup: { _ in content() },
5959
background: background
6060
)
6161
)
@@ -79,15 +79,15 @@ public extension View {
7979
isPresented: Binding<Bool>,
8080
duration: Duration = .seconds(0.35),
8181
animation: Animation = .spring(duration: 0.3, bounce: 0.25, blendDuration: 0.1),
82-
@ViewBuilder popup: @escaping (_ isPresented: Bool) -> Popup,
83-
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) }
82+
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) },
83+
@ViewBuilder content: @escaping (_ isPresented: Bool) -> Popup
8484
) -> some View {
8585
modifier(
8686
PopupModifier(
8787
isPresented: isPresented,
8888
duration: duration.nanoseconds,
8989
animation: animation,
90-
popup: popup,
90+
popup: content,
9191
background: background
9292
)
9393
)
@@ -111,15 +111,15 @@ public extension View {
111111
isPresented: Binding<Bool>,
112112
duration: Duration = .seconds(0.35),
113113
animation: Animation = .spring(duration: 0.3, bounce: 0.25, blendDuration: 0.1),
114-
@ViewBuilder popup: @escaping () -> Popup,
115-
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) }
114+
@ViewBuilder background: @escaping (_ isPresented: Bool) -> Background = { Color.black.opacity($0 ? 0.5 : 0) },
115+
@ViewBuilder content: @escaping () -> Popup
116116
) -> some View {
117117
modifier(
118118
PopupModifier(
119119
isPresented: isPresented,
120120
duration: duration.nanoseconds,
121121
animation: animation,
122-
popup: { _ in popup() },
122+
popup: { _ in content() },
123123
background: background
124124
)
125125
)

0 commit comments

Comments
 (0)