circular percentage header

This commit is contained in:
Trey t
2022-02-06 12:00:43 -06:00
parent 587c557e16
commit ca25ddffd5
2 changed files with 61 additions and 5 deletions

View File

@@ -21,10 +21,14 @@ struct SwitchableView: View {
.opacity(currentViewIdx == 0 ? 1 : 0)
.allowsHitTesting(false)
HeaderPercView(fakeData: false, backDays: daysBack)
HeaderPercView(fakeData: false, backDays: daysBack, type: .circular)
.opacity(currentViewIdx == 1 ? 1 : 0)
.allowsHitTesting(false)
HeaderPercView(fakeData: false, backDays: daysBack, type: .text)
.opacity(currentViewIdx == 2 ? 1 : 0)
.allowsHitTesting(false)
VStack {
HStack {
Spacer()
@@ -55,7 +59,7 @@ struct SwitchableView: View {
.padding(.bottom, 30)
.onTapGesture {
currentViewIdx += 1
if currentViewIdx == 2 {
if currentViewIdx == 3 {
currentViewIdx = 0
}
}