diff --git a/app/src/main/java/com/tangem/tap/features/home/compose/views/StoriesButton.kt b/app/src/main/java/com/tangem/tap/features/home/compose/views/StoriesButton.kt index 45b8745cca..c2e879dc2d 100644 --- a/app/src/main/java/com/tangem/tap/features/home/compose/views/StoriesButton.kt +++ b/app/src/main/java/com/tangem/tap/features/home/compose/views/StoriesButton.kt @@ -26,6 +26,7 @@ internal fun StoriesButton( showProgress = showProgress, enabled = true, shape = TangemTheme.shapes.roundedCornersXMedium, + textStyle = TangemTheme.typography.subtitle1, iconPadding = when (icon) { is TangemButtonIconPosition.Start -> TangemTheme.dimens.spacing4 is TangemButtonIconPosition.End, diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt b/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt index 9667a00860..e43a390155 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/Buttons.kt @@ -14,8 +14,8 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview import com.tangem.core.ui.R import com.tangem.core.ui.components.buttons.common.* -import com.tangem.core.ui.res.TangemThemePreview import com.tangem.core.ui.res.TangemTheme +import com.tangem.core.ui.res.TangemThemePreview // region TextButton /** @@ -102,6 +102,7 @@ fun PrimaryButton( enabled = enabled, showProgress = showProgress, size = size, + textStyle = TangemTheme.typography.subtitle1, ) } @@ -127,6 +128,7 @@ fun PrimaryButtonIconEnd( enabled = enabled, showProgress = showProgress, size = size, + textStyle = TangemTheme.typography.subtitle1, ) } @@ -153,6 +155,7 @@ fun PrimaryButtonIconEndTwoLines( showProgress = showProgress, additionalText = additionalText, size = TangemButtonSize.TwoLines, + textStyle = TangemTheme.typography.subtitle1, ) } @@ -176,6 +179,7 @@ fun PrimaryButtonIconStart( colors = TangemButtonsDefaults.primaryButtonColors, enabled = enabled, showProgress = showProgress, + textStyle = TangemTheme.typography.subtitle1, ) } // endregion PrimaryButton @@ -201,6 +205,7 @@ fun SecondaryButton( showProgress = showProgress, size = size, shape = shape, + textStyle = TangemTheme.typography.subtitle1, ) } @@ -224,6 +229,7 @@ fun SecondaryButtonIconEnd( colors = TangemButtonsDefaults.secondaryButtonColors, enabled = enabled, showProgress = showProgress, + textStyle = TangemTheme.typography.subtitle1, ) } @@ -247,6 +253,7 @@ fun SecondaryButtonIconStart( colors = TangemButtonsDefaults.secondaryButtonColors, enabled = enabled, showProgress = showProgress, + textStyle = TangemTheme.typography.subtitle1, ) } // endregion SecondaryButton diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/NotificationWithBackground.kt b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/NotificationWithBackground.kt index a6031f054b..d76569543f 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/NotificationWithBackground.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/NotificationWithBackground.kt @@ -7,9 +7,9 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.defaultMinSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size -import androidx.compose.material3.ripple import androidx.compose.material3.Icon import androidx.compose.material3.Text +import androidx.compose.material3.ripple import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier @@ -132,17 +132,6 @@ fun NotificationWithBackground(config: NotificationConfig, modifier: Modifier = ) val isDarkMode = LocalIsInDarkTheme.current TangemButton( - text = button?.text?.resolveReference().orEmpty(), - icon = TangemButtonIconPosition.Start(button?.iconResId ?: R.drawable.ic_exchange_vertical_24), - onClick = button?.onClick ?: {}, - colors = TangemButtonColors( - backgroundColor = if (isDarkMode) Light4 else TangemTheme.colors.button.secondary, - contentColor = Dark6, - disabledBackgroundColor = TangemTheme.colors.button.disabled, - disabledContentColor = TangemTheme.colors.text.disabled, - ), - enabled = true, - showProgress = false, modifier = Modifier.constrainAs(buttonRef) { start.linkTo(parent.start, spacing12) end.linkTo(parent.end, spacing12) @@ -154,6 +143,18 @@ fun NotificationWithBackground(config: NotificationConfig, modifier: Modifier = Visibility.Visible } }, + text = button?.text?.resolveReference().orEmpty(), + icon = TangemButtonIconPosition.Start(button?.iconResId ?: R.drawable.ic_exchange_vertical_24), + onClick = button?.onClick ?: {}, + colors = TangemButtonColors( + backgroundColor = if (isDarkMode) Light4 else TangemTheme.colors.button.secondary, + contentColor = Dark6, + disabledBackgroundColor = TangemTheme.colors.button.disabled, + disabledContentColor = TangemTheme.colors.text.disabled, + ), + textStyle = TangemTheme.typography.subtitle1, + enabled = true, + showProgress = false, ) } } diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/OkxPromoNotification.kt b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/OkxPromoNotification.kt index 2888045227..94f39ed5dd 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/notifications/OkxPromoNotification.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/notifications/OkxPromoNotification.kt @@ -110,6 +110,13 @@ private fun Button(config: NotificationConfig) { button?.let { val isDarkMode = LocalIsInDarkTheme.current TangemButton( + modifier = Modifier + .fillMaxWidth() + .padding( + start = TangemTheme.dimens.spacing12, + end = TangemTheme.dimens.spacing12, + bottom = TangemTheme.dimens.spacing12, + ), text = button.text.resolveReference(), icon = TangemButtonIconPosition.Start(button.iconResId ?: R.drawable.ic_exchange_vertical_24), onClick = button.onClick, @@ -119,15 +126,9 @@ private fun Button(config: NotificationConfig) { disabledBackgroundColor = TangemTheme.colors.button.disabled, disabledContentColor = TangemTheme.colors.text.disabled, ), + textStyle = TangemTheme.typography.subtitle1, enabled = true, showProgress = false, - modifier = Modifier - .fillMaxWidth() - .padding( - start = TangemTheme.dimens.spacing12, - end = TangemTheme.dimens.spacing12, - bottom = TangemTheme.dimens.spacing12, - ), ) } } diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/ui/AddToPortfolioBottomSheet.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/ui/AddToPortfolioBottomSheet.kt index 4f99ce0afd..73f6dca547 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/ui/AddToPortfolioBottomSheet.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/portfolio/impl/ui/AddToPortfolioBottomSheet.kt @@ -163,6 +163,7 @@ private fun ContinueButton( showProgress = false, size = TangemButtonSize.Default, colors = TangemButtonsDefaults.primaryButtonColors, + textStyle = TangemTheme.typography.subtitle1, onClick = onClick, animateContentChange = true, ) diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/SendNavigationButtons.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/SendNavigationButtons.kt index 8cd6867e1d..85b4d38175 100644 --- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/SendNavigationButtons.kt +++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/SendNavigationButtons.kt @@ -127,6 +127,7 @@ private fun SendNavigationButton( } } TangemButton( + modifier = Modifier.fillMaxWidth(), text = stringResource(buttonTextId), icon = buttonIcon, enabled = isButtonEnabled, @@ -135,8 +136,8 @@ private fun SendNavigationButton( buttonClick() }, showProgress = false, - modifier = Modifier.fillMaxWidth(), colors = TangemButtonsDefaults.primaryButtonColors, + textStyle = TangemTheme.typography.subtitle1, ) } }