Created
September 13, 2020 01:48
-
-
Save SarahAlsharif/6939816a2f86e0f2ff31a93e6a5e3346 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 Container <Content : View> : View { | |
var content : Content | |
init(@ViewBuilder content: () -> Content) { | |
self.content = content() | |
} | |
var body: some View { | |
ZStack { | |
RoundedRectangle(cornerRadius: 20) | |
.foregroundColor(Color.blue.opacity(0.3)) | |
VStack { | |
Spacer() | |
content | |
.font(.system(size: 20)) | |
.foregroundColor(.secondary) | |
.padding() | |
Spacer() | |
Divider() | |
HStack { | |
Button(action: { | |
// action | |
}) { | |
Image(systemName: "hand.thumbsup") | |
}.frame(width: 150) | |
Divider() | |
Button(action: { | |
// action | |
}) { | |
Image(systemName: "hand.thumbsdown") | |
} | |
.frame(width: 150) | |
} | |
.font(.system(size: 20)) | |
.frame(height: 50) | |
.padding() | |
} | |
} | |
.padding() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment