Updated on 2026-08-14
This commit is contained in:
parent
f97696b868
commit
3ebfda2513
2 changed files with 8 additions and 6 deletions
|
|
@ -20,6 +20,7 @@ import androidx.compose.ui.text.TextStyle
|
|||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.tangem.core.ui.components.ResizableText
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
|
|
@ -85,7 +86,9 @@ fun TangemButton(
|
|||
},
|
||||
icon = { iconResId ->
|
||||
Icon(
|
||||
modifier = Modifier.buttonContentSize(maxContentSize),
|
||||
modifier = Modifier
|
||||
.buttonContentSize(maxContentSize)
|
||||
.padding(vertical = 2.dp),
|
||||
painter = painterResource(id = iconResId),
|
||||
tint = colors.contentColor(enabled = enabled).value,
|
||||
contentDescription = null,
|
||||
|
|
|
|||
|
|
@ -33,9 +33,8 @@ internal fun TangemButtonSize.toHeightDp(): Dp = when (this) {
|
|||
@Composable
|
||||
@ReadOnlyComposable
|
||||
internal fun TangemButtonSize.toShape(): Shape = when (this) {
|
||||
TangemButtonSize.Default,
|
||||
TangemButtonSize.WideAction,
|
||||
-> TangemTheme.shapes.roundedCornersMedium
|
||||
TangemButtonSize.Default -> TangemTheme.shapes.roundedCornersXMedium
|
||||
TangemButtonSize.WideAction -> TangemTheme.shapes.roundedCornersMedium
|
||||
TangemButtonSize.Text -> TangemTheme.shapes.roundedCornersSmall
|
||||
TangemButtonSize.Selector -> TangemTheme.shapes.roundedCornersSmall
|
||||
TangemButtonSize.Action -> TangemTheme.shapes.roundedCornersMedium
|
||||
|
|
@ -64,8 +63,8 @@ internal fun TangemButtonSize.toContentPadding(icon: TangemButtonIconPosition):
|
|||
|
||||
return when (this) {
|
||||
TangemButtonSize.Default -> PaddingValues(
|
||||
top = TangemTheme.dimens.spacing14,
|
||||
bottom = TangemTheme.dimens.spacing14,
|
||||
top = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing12,
|
||||
start = horizontalPadding.first,
|
||||
end = horizontalPadding.second,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue