closed #15
This commit is contained in:
@@ -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])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user