Created
September 22, 2021 15:15
-
-
Save tjmaynes/4bd7a204424d0115b5a8b6fc41abc77a to your computer and use it in GitHub Desktop.
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
| import SwiftUI | |
| struct ButtonView: View { | |
| let message: String | |
| let buttonTitle: String | |
| let onTap: () -> Void | |
| var body: some View { | |
| VStack { | |
| Text(message).padding() | |
| Button(action: { onTap() }) { | |
| Text(buttonTitle) | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment