Created
August 12, 2021 17:40
-
-
Save IsaAliev/275fe597800714d571487b262f0f1bca to your computer and use it in GitHub Desktop.
This file contains 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
struct ModalView: View { | |
let dismiss: () -> Void | |
var body: some View { | |
VStack { | |
Text("This is modal view") | |
.padding() | |
Button("Close") { | |
withAnimation { | |
dismiss() | |
} | |
}.padding() | |
} | |
.background(Color.white) | |
.cornerRadius(10) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment