Creates a button that displays a custom label.
struct SignInView: View {
var body: some View {
Button(action: { /* sign the user in */ }) {
Text("Sign In")
}
}
}

You can also use multiple trailing closure syntax to accomplish
the same task:
struct SignInView: View {
var body: some View {
Button {
/* sign the user in */
} label: {
Text("Sign In")
}
}
}

- Parameters:
- action: The action to perform when the user triggers the button.
- label: A view that describes the purpose of the button's `action`.
The content and behavior of the view.
The type of view representing the body of this view.
When you create a custom view, Swift infers this type from your
implementation of the required `body` property.