spacing on shapes and text

This commit is contained in:
Trey t
2022-03-20 14:43:25 -05:00
parent 36a688084c
commit e226437e50
5 changed files with 79 additions and 39 deletions

View File

@@ -9,7 +9,7 @@ import SwiftUI
enum PercViewType {
case text
case circular
case shape
}
struct HeaderPercView: View {
@@ -72,7 +72,7 @@ struct HeaderPercView: View {
}
}
private var circularViews: some View {
private var shapeViews: some View {
VStack {
Spacer()
HStack {
@@ -102,8 +102,9 @@ struct HeaderPercView: View {
switch self.type {
case .text:
textViews
case .circular:
circularViews
case .shape:
shapeViews
.padding([.leading, .trailing])
}
}
}
@@ -113,6 +114,6 @@ struct HeaderPercView_Previews: PreviewProvider {
static var previews: some View {
HeaderPercView(fakeData: true, backDays: 30, type: .text)
HeaderPercView(fakeData: true, backDays: 30, type: .circular)
HeaderPercView(fakeData: true, backDays: 30, type: .shape)
}
}