-
-
Save anupamchugh/9b51ee88d50e94946dc6351a6bddf35e 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 BarView: View{ | |
var value: CGFloat | |
var cornerRadius: CGFloat | |
var body: some View { | |
VStack { | |
ZStack (alignment: .bottom) { | |
RoundedRectangle(cornerRadius: cornerRadius) | |
.frame(width: 30, height: 200).foregroundColor(.black) | |
RoundedRectangle(cornerRadius: cornerRadius) | |
.frame(width: 30, height: value).foregroundColor(.green) | |
}.padding(.bottom, 8) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment