Issue #675
Use wrappedValue
to get the underlying value that Binding contains
extension View {
func addOverlay(shows: Binding<Bool>) -> some View {
HStack {
self
Spacer()
}
.overlay(
HStack {
Spacer()
SmallButton(
imageName: "downArrow",
tooltip: shows.wrappedValue ? "Collapse" : "Expand",
action: {
shows.wrappedValue.toggle()
}
)
.rotationEffect(.radians(shows.wrappedValue ? .pi : 0))
}
)
}
}