Fixed padding on components
This commit is contained in:
@@ -16,11 +16,13 @@ struct ContentView: View {
|
||||
@State private var segmentedSelection: SegementedSelection = .search
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
VStack {
|
||||
Picker("", selection: $segmentedSelection) {
|
||||
ForEach(SegementedSelection.allCases, id: \.self) { sel in
|
||||
Text(sel.rawValue).tag(sel)
|
||||
}
|
||||
}.pickerStyle(.segmented)
|
||||
.padding(.leading, -8)
|
||||
switch segmentedSelection {
|
||||
case .search:
|
||||
SearchView()
|
||||
@@ -30,6 +32,7 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView()
|
||||
|
||||
@@ -13,8 +13,6 @@ struct SearchView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
TextField("Search", text: $query)
|
||||
.padding()
|
||||
.padding(.bottom, 0)
|
||||
.onSubmit {
|
||||
brew.getInfo(on: query)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user