Switched the assignment size to each symbol

This commit is contained in:
2023-08-17 11:35:01 +02:00
parent e9ee10b9c0
commit b80723c964

View File

@@ -87,7 +87,7 @@ struct CardView: View {
VStack { VStack {
ForEach (0..<numberOfSymbols, id: \.self) { _ in ForEach (0..<numberOfSymbols, id: \.self) { _ in
createShape().frame(height: geometry.size.height/4) createShape(height: geometry.size.height / 4)
} }
} }
} }
@@ -95,14 +95,17 @@ struct CardView: View {
} }
@ViewBuilder @ViewBuilder
private func createShape() -> some View { private func createShape(height: CGFloat) -> some View {
switch symbol { switch symbol {
case .diamond: case .diamond:
colorShape(Diamond()) colorShape(Diamond())
.frame(height: height)
case .squiggles: case .squiggles:
colorShape(Rectangle()) colorShape(Rectangle())
.frame(height: height)
default: default:
colorShape(RoundedRectangle(cornerRadius: 100)) colorShape(RoundedRectangle(cornerRadius: 100))
.frame(height: height)
} }
} }