title: SwiftUI Button proportional width height
body: <p>How can we achieve <code>proportional</code> size  for <code>Button</code> in <code>SwiftUI</code></p>
  
  <pre><code>struct ContentView: View {
  
      @State private var emailText = ""
      @State private var passwordText = ""
  
      var body: some View {
          NavigationView {
              ScrollView {
  
                  VStack(alignment: .center, spacing: 30.0, content: {
  
                      TextField("Enter Email", text: $emailText)
                          .textFieldStyle(RoundedBorderTextFieldStyle())
  
                      SecureField("Enter Password", text: $passwordText)
                          .textFieldStyle(RoundedBorderTextFieldStyle())
  
                      Button(action: {
                          print("Button Tapped")
                      }) {
                          Text("Login")
  
                      }.frame(width: 100,
                              height: 40,
                              alignment: .center).background(Color.orange)
  
                     Button(action: {
                       print("Button Tapped")
                     }) {
                       Text("Sign Up")
  
                    }.frame(width: 150,
                           height: 40,
                           alignment: .center).background(Color.yellow)
  
  
                  }).padding()
              }
              .navigationBarTitle("Login")
          }
      }
  }
  </code></pre>
  
  <hr>
  
  <p><a href="https://i.stack.imgur.com/PWAAO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PWAAO.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>How to achieve proportional for Login and Sign Up button according to device wise.</p>
  </blockquote>