title: Button size and color in SwiftUI
body: <p>I am new in SwiftUI and also iOS development.</p>
  <p>I tried to create 2 buttons, but I can't change the color of background or size.</p>
  <p>it looks like this:</p>
  <p><a href="https://i.stack.imgur.com/8Hu4J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Hu4J.png" alt="enter image description here" /></a></p>
  <p>below is the code:</p>
  <pre><code>        HStack {
              Button( action: {
                  print(&quot;click&quot;)
              }){
                  Text(&quot;Login&quot;)
                      .foregroundColor(.purple)
                      .padding()
                      .overlay(
                          RoundedRectangle(cornerRadius: 20)
                              .stroke(Color.purple, lineWidth: 1)
                      )
              }
              Button( action: {
                  print(&quot;click&quot;)
              }){
                  Text(&quot;Register&quot;)
                      .foregroundColor(.white)
                      .padding()
                      .overlay(
                          RoundedRectangle(cornerRadius: 20)
                              .stroke(Color.black, lineWidth: 1)
                              
                      )
                  
              }
          }
  </code></pre>
  <p>I am looking to get a button which is almost using half of the screen with margin of 10px on each side. The goal is to have the 2 buttons to cover almost the width of the display. Also I try to make it thinner. the distance between the border on top and bottom is too big, I would like it close to the text when the one on left and right must be wider.</p>
  <p>Also I can't figure out how to change the button background color to black</p>
  <p>Any idea ?</p>
  <p>Thanks</p>