title: How to remove or reduce padding in Jetpack compose OutlinedButton
body: <p>Unable to reduce the huge padding in OutlinedButton. Tried contentPadding, modifier padding, etc. Cannot reduce padding for text &quot;apple&quot;. Any idea? Should I use any other type of compose component for this?</p>
  <pre><code>OutlinedButton(     
      onClick = {},       
      border = BorderStroke(1.dp, Color.White),
      shape = RoundedCornerShape(12.dp),
      contentPadding = PaddingValues(0.dp),
      modifier = Modifier 
          .background(bgColor)
          .height(24.dp)      
          .padding(all = 0.dp),
      colors = ButtonDefaults.outlinedButtonColors(backgroundColor = bgColor)) {
          Text(&quot;apple&quot;,   
              color = Color.White,
              style = MaterialTheme.typography.body2,
              modifier = Modifier.height(10.dp).padding(vertical = 0.dp), //.background(bgColor),
          )               
      }
  </code></pre>
  <p>Updated after @liveAnyway's answer (thanks!) which appeared to help. After that I removed height from OutlinedButton too - ideally I wanted it like &quot;wrap-content&quot;. Once I made that change, I still see the padding. Bottomline I don't want any absolute height specified so that it can work with different font size from system settings.</p>
  <pre><code>Row(modifier = Modifier.padding(vertical = 12.dp)) {
      OutlinedButton( 
          onClick = {}, 
          border = BorderStroke(1.dp, Color.White),
          shape = RoundedCornerShape(18.dp),
          contentPadding = PaddingValues(0.dp),
          modifier = Modifier
              .background(bgColor)
              .padding(all = 0.dp),
          colors = ButtonDefaults.outlinedButtonColors(backgroundColor = bgColor)
      ) {             
          Text(&quot;apple&quot;,   
              color = Color.White,
              style = MaterialTheme.typography.body2,
              modifier = Modifier.padding(vertical = 0.dp),
          )               
      }               
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/N2NC4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/N2NC4.png" alt="enter image description here" /></a></p>