Pedro Alberto
10/26/2022, 1:52 PMStylianos Gakis
10/26/2022, 2:06 PMBox()
to see how that’d look like.Zaki Shaikh
10/26/2022, 2:07 PMPedro Alberto
10/26/2022, 2:07 PMPedro Alberto
10/26/2022, 2:08 PMcontentPadding = PaddingValues(0.dp),
Stylianos Gakis
10/26/2022, 2:08 PMStylianos Gakis
10/26/2022, 2:09 PMZaki Shaikh
10/26/2022, 2:09 PMStylianos Gakis
10/26/2022, 2:23 PMminimumTouchTargetSize
modifier so that it doesn’t become to small, and that one has a min size of 48.dp width and height.
So even if you don’t add the padding on the button itself, it picks it up from the Surface overload.Pedro Alberto
10/27/2022, 7:20 AMStylianos Gakis
10/27/2022, 7:32 AMPedro Alberto
10/27/2022, 7:36 AM@Preview
@Composable
fun testingBox() {
Box(modifier = Modifier
.height(52.dp)
.padding(0.dp)
.wrapContentSize()
.clip(OXDesignSystemTheme.shapes.extraLarge)
.border(BorderStroke(0.dp, SolidColor(Color.Transparent)), MyDesignSystemTheme.shapes.extraLarge)
.background(Color.Green)) {
Button(
onClick = { /*TODO*/ },
modifier = Modifier
.height(52.dp)
.padding(0.dp)
.clip(RoundedCornerShape(10.dp)),
contentPadding = PaddingValues(8.dp),
shape = MyDesignSystemTheme.shapes.extraLarge
) {
Text(text = "Hello Hello")
}
}
}
Pedro Alberto
10/27/2022, 7:36 AMPedro Alberto
10/27/2022, 7:36 AM