ButtonにBorderをつけるかの処理
struct ContentView: View {
@State var showOverlay = false
var body: some View {
Button(action: { showOverlay.toggle() }) {
Text("Hello World")
.overlay(
showOverlay ?
RoundedRectangle(cornerRadius: 10)
.stroke(Color.black, lineWidth:1)
: nil)
}
}
}