chanjungskim
03/07/2023, 9:02 AMchanjungskim
03/07/2023, 9:13 AMchanjungskim
03/07/2023, 9:13 AMButton(
onClick = {
isPressed = !isPressed
onNotifyButtonState.invoke(index, isPressed)
},
shape = buttonShape,
border = if (isPressed) BorderStroke(1.dp, Color.PressedButtonStroke)
else null,
contentPadding = contentPadding,
colors = ButtonDefaults.buttonColors(buttonColor),
modifier = modifier,
) {
Box(
modifier = Modifier.fillMaxWidth()
) {
Text(
text = text,
fontSize = fontSize,
color = fontColor,
modifier = Modifier
.align(Alignment.CenterStart)
)
Icon(
painter = painterResource(id = if(isPressed) R.drawable.ico_check_on else R.drawable.ico_check_nor),
contentDescription = null,
modifier = Modifier
.align(Alignment.CenterEnd)
.height(7.3.dp)
.width(10.3.dp)
)
}
}