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