As you can see from the image I have a TextField and after list.
The list has a transparent background, I'm using .listStyle(SidebarListStyle()).
But how do I get a transparent background where the TextField is located.
Code:
VStack(alignment: .leading, spacing: 0) {
TextField("Username", text: $username)
.padding(.leading, 20)
.padding(.trailing, 20)
.background(
RoundedRectangle(cornerRadius: 5)
.fill(Color.white.opacity(0.3)
)
.padding(.leading, 20)
.padding(.trailing, 20)
)
.padding(.top)
.padding(.bottom)
List(restaurants) { restaurant in
RestaurantRow(restaurant: restaurant)
}.listStyle(SidebarListStyle())
}.padding(0)
.frame(width: 400.0, height: 400.0, alignment: .top)

