Last active
October 3, 2021 07:09
-
-
Save edudnyk/00cf89a01b129a088e04a909434cdcec to your computer and use it in GitHub Desktop.
The snippet of the public interface provided by SheeKit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct DismissAction { | |
public func callAsFunction() | |
} | |
extension EnvironmentValues { | |
public internal(set) var shee_dismiss: DismissAction | |
public internal(set) var shee_isPresented: Bool | |
} | |
extension View { | |
public func shee<Content>(isPresented: Binding<Bool>, | |
presentationStyle: ModalPresentationStyle = .automatic, | |
presentedViewControllerParameters: UIViewControllerProxy? = nil, | |
onDismiss: (() -> Void)? = nil, | |
@ViewBuilder content: @escaping () -> Content) -> some View where Content : View | |
public func shee<Item, Content>(item: Binding<Item?>, | |
presentationStyle: ModalPresentationStyle = .automatic, | |
presentedViewControllerParameters: UIViewControllerProxy? = nil, | |
onDismiss: (() -> Void)? = nil, | |
@ViewBuilder content: @escaping (Item) -> Content) -> some View where Item : Identifiable, Content : View | |
public func shee_interactiveDismissDisabled(_ isDisabled: Bool = true) -> some View | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment