Switched the assignment size to each symbol
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user