修正ActionButton
This commit is contained in:
@@ -65,12 +65,13 @@ fun ActionButton(
|
|||||||
modifier = modifier
|
modifier = modifier
|
||||||
.clip(RoundedCornerShape(24.dp))
|
.clip(RoundedCornerShape(24.dp))
|
||||||
.background(animatedBackgroundColor)
|
.background(animatedBackgroundColor)
|
||||||
.padding(contentPadding)
|
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
if (enabled && !isLoading) {
|
if (enabled && !isLoading) {
|
||||||
click()
|
click()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
.padding(contentPadding),
|
||||||
|
|
||||||
contentAlignment = Alignment.CenterStart
|
contentAlignment = Alignment.CenterStart
|
||||||
) {
|
) {
|
||||||
if (!isLoading) {
|
if (!isLoading) {
|
||||||
@@ -86,15 +87,22 @@ fun ActionButton(
|
|||||||
},
|
},
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
Box(modifier = Modifier.align(Alignment.CenterStart)){
|
Box(
|
||||||
leading?.invoke()
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
contentAlignment = Alignment.CenterStart
|
||||||
|
) {
|
||||||
|
Box(modifier = Modifier.align(Alignment.CenterStart)){
|
||||||
|
leading?.invoke()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
fontSize = 17.sp,
|
fontSize = 17.sp,
|
||||||
color = color,
|
color = color,
|
||||||
fontWeight = FontWeight.W900,
|
fontWeight = FontWeight.W900,
|
||||||
textAlign = if (expandText) TextAlign.Center else TextAlign.Start
|
textAlign = if (expandText) TextAlign.Center else TextAlign.Start
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user