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 {
VStack {
Button(action: {
withAnimation{
showFilter.toggle()
}
}, label: {
Text("filter")
.textCase(.uppercase)
})
filterButon
.padding([.leading, .trailing, .top])
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 {
let data: [MoodEntry]
let mood: Mood
@@ -275,6 +279,8 @@ struct FilterView: View {
.cornerRadius(25)
.padding([ .leading, .trailing])
}
filterButon
.padding([.leading, .trailing, .top])
}
}