This commit is contained in:
Trey t
2022-01-15 12:18:39 -06:00
parent ef4cc2f159
commit 0298b3bf5e

View File

@@ -151,14 +151,7 @@ struct FilterView: View {
var body: some View { var body: some View {
VStack { VStack {
Button(action: { filterButon
withAnimation{
showFilter.toggle()
}
}, label: {
Text("filter")
.textCase(.uppercase)
})
.padding([.leading, .trailing, .top]) .padding([.leading, .trailing, .top])
statsView statsView
@@ -185,6 +178,17 @@ struct FilterView: View {
} }
} }
private var filterButon: some View {
Button(action: {
withAnimation{
showFilter.toggle()
}
}, label: {
Text(showFilter ? "Close Filter" : "Filter")
.textCase(.uppercase)
})
}
struct StatsSubView: View { struct StatsSubView: View {
let data: [MoodEntry] let data: [MoodEntry]
let mood: Mood let mood: Mood
@@ -275,6 +279,8 @@ struct FilterView: View {
.cornerRadius(25) .cornerRadius(25)
.padding([ .leading, .trailing]) .padding([ .leading, .trailing])
} }
filterButon
.padding([.leading, .trailing, .top])
} }
} }