circular percentage header
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user