Created
June 13, 2022 15:38
-
-
Save anupamchugh/d45a52d0fe267d32fe5628321a638f5d 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 PosterView : View{ | |
@Binding var bgColor: Color | |
@Binding var text: String | |
var body: some View{ | |
ZStack { | |
Rectangle().fill($bgColor.wrappedValue.gradient) | |
.cornerRadius(20) | |
VStack { | |
Text(text) | |
.font(.largeTitle) | |
.foregroundColor(.white) | |
.minimumScaleFactor(0.5) | |
.padding() | |
Image(systemName: "swift") | |
.font(.system(size: 80)) | |
.backgroundStyle(.clear) | |
.foregroundStyle(.white) | |
.padding(20) | |
} | |
} | |
.padding() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment