I know I can use something like:
Text("Hello World")
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.black, lineWidth:1)
)
to add a border around a Text View, but how can I add it based on a true/false value? Say I want to have a button that when pushed adds a border around text, how can I implement the overlay to only appear if a var is true?
