This commit is contained in:
Vladimir Dubovik 2024-12-03 13:56:08 +03:00
parent 2b506ce538
commit 155a175635
3 changed files with 22 additions and 26 deletions

View File

@ -21,7 +21,6 @@ struct ContentView: View {
}
TabBarView(selectedTab: $selectedTab)
}
.background(Color("background"))
}
}

View File

@ -72,7 +72,7 @@ struct ScheduleView: View {
}
}
}
.background(.secondary.opacity(0.1))
.background(Color("background"))
.onAppear(perform: {
if weekSlider.isEmpty {
let currentWeek = Date().fetchWeek()

View File

@ -13,13 +13,18 @@ struct SearchBarView: View {
.padding(.trailing, 7)
TextField("Поиск группы", text: $text)
.disableAutocorrection(true)
.frame(width: .infinity, height: 40)
.onTapGesture {
self.isEditing = true
}
.onSubmit {
self.isEditing = false
}
ZStack {
Rectangle()
.frame(width: 40, height: 40)
.foregroundColor(.white)
.cornerRadius(15)
Group {
if isEditing {
Button {
self.text = ""
@ -31,19 +36,11 @@ struct SearchBarView: View {
.offset(x: 10)
.foregroundColor(.gray)
.background(
Rectangle()
.frame(width: 40, height: 40)
.foregroundColor(.white)
.cornerRadius(15)
)
}
.background(Color.white)
}
else {
Rectangle()
.frame(width: 40, height: 40)
.foregroundColor(.white)
.cornerRadius(15)
}
}
}
.background(
@ -56,7 +53,7 @@ struct SearchBarView: View {
} label: {
ZStack {
Rectangle()
.frame(width: 36, height: 36)
.frame(width: 40)
.foregroundStyle(Color("blueColor"))
.cornerRadius(15)
Image(systemName: "plus")
@ -67,9 +64,9 @@ struct SearchBarView: View {
}
}
}
.frame(width: .infinity)
.padding(.horizontal)
.padding(.vertical, 5)
.padding(.top, 5)
.frame(height: 40)
}
}