Updated on 2026-08-14
This commit is contained in:
parent
5b8839cf52
commit
ec66519042
21 changed files with 301 additions and 100 deletions
|
|
@ -12,6 +12,7 @@ import com.tangem.core.ui.ds.row.token.TangemTokenRowUM
|
|||
import com.tangem.core.ui.event.consumedEvent
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.stringReference
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.wallet.impl.R
|
||||
import com.tangem.feature.wallet.presentation.common.WalletPreviewDataLegacy.topBarConfig
|
||||
import com.tangem.feature.wallet.presentation.preview.WalletBalancePreview
|
||||
|
|
@ -74,7 +75,10 @@ internal object WalletScreenPreviewData {
|
|||
text = resourceReference(R.string.organize_tokens_title),
|
||||
type = TangemButtonType.Secondary,
|
||||
onClick = {},
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted },
|
||||
),
|
||||
size = TangemButtonSize.X9,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
),
|
||||
|
|
@ -107,7 +111,10 @@ internal object WalletScreenPreviewData {
|
|||
text = resourceReference(R.string.organize_tokens_title),
|
||||
type = TangemButtonType.Secondary,
|
||||
onClick = {},
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted },
|
||||
),
|
||||
size = TangemButtonSize.X9,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
),
|
||||
|
|
@ -134,7 +141,10 @@ internal object WalletScreenPreviewData {
|
|||
text = resourceReference(R.string.organize_tokens_title),
|
||||
type = TangemButtonType.Secondary,
|
||||
onClick = {},
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted },
|
||||
),
|
||||
size = TangemButtonSize.X9,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ import androidx.compose.runtime.Immutable
|
|||
import com.tangem.core.ui.ds.button.TangemButtonShape
|
||||
import com.tangem.core.ui.ds.button.TangemButtonType
|
||||
import com.tangem.core.ui.ds.button.TangemButtonUM
|
||||
import com.tangem.core.ui.ds.image.TangemIconUM
|
||||
import com.tangem.core.ui.extensions.TextReference
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.feature.wallet.impl.R
|
||||
|
||||
/**
|
||||
|
|
@ -25,7 +27,16 @@ internal sealed class WalletActionButtons(
|
|||
val buttonUM: TangemButtonUM
|
||||
get() = TangemButtonUM(
|
||||
text = text,
|
||||
iconRes = iconRes,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = iconRes,
|
||||
tintReference = {
|
||||
if (isEnabled) {
|
||||
TangemTheme.colors2.graphic.neutral.primary
|
||||
} else {
|
||||
TangemTheme.colors2.graphic.neutral.quaternary
|
||||
}
|
||||
},
|
||||
),
|
||||
type = TangemButtonType.Secondary,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
onClick = onClick,
|
||||
|
|
|
|||
|
|
@ -251,7 +251,12 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
|
|||
TangemMessageButtonUM(
|
||||
text = resourceReference(id = R.string.common_generate_addresses),
|
||||
type = TangemButtonType.Primary,
|
||||
iconRes = tangemIcon,
|
||||
tangemIconUM = tangemIcon?.let {
|
||||
TangemIconUM.Icon(
|
||||
iconRes = tangemIcon,
|
||||
tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted },
|
||||
)
|
||||
},
|
||||
onClick = onGenerateClick,
|
||||
),
|
||||
),
|
||||
|
|
@ -307,7 +312,10 @@ internal sealed class WalletNotificationUM(val messageUM: TangemMessageUM, val t
|
|||
buttonsUM = persistentListOf(
|
||||
TangemMessageButtonUM(
|
||||
text = buttonText,
|
||||
iconRes = R.drawable.ic_tangem_24,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = R.drawable.ic_tangem_24,
|
||||
tintReference = { TangemTheme.colors2.graphic.neutral.primaryInverted },
|
||||
),
|
||||
onClick = onRefreshClick,
|
||||
type = TangemButtonType.Primary,
|
||||
isLoading = shouldShowProgress,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ import com.tangem.core.ui.ds.button.TangemButtonShape
|
|||
import com.tangem.core.ui.ds.button.TangemButtonSize
|
||||
import com.tangem.core.ui.ds.button.TangemButtonType
|
||||
import com.tangem.core.ui.ds.button.TangemButtonUM
|
||||
import com.tangem.core.ui.ds.image.TangemIconUM
|
||||
import com.tangem.core.ui.ds.row.header.TangemHeaderRowUM
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.core.ui.extensions.wrappedList
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
import com.tangem.domain.account.models.AccountStatusList
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
import com.tangem.domain.models.TotalFiatBalance
|
||||
|
|
@ -169,7 +171,16 @@ internal class WalletTokensListUMConverter(
|
|||
size = TangemButtonSize.X9,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
type = TangemButtonType.PrimaryInverse,
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tangemIconUM = TangemIconUM.Icon(
|
||||
iconRes = R.drawable.ic_filter_default_24,
|
||||
tintReference = {
|
||||
if (accountList.totalFiatBalance !is TotalFiatBalance.Loading) {
|
||||
TangemTheme.colors2.graphic.neutral.primary
|
||||
} else {
|
||||
TangemTheme.colors2.graphic.neutral.quaternary
|
||||
}
|
||||
},
|
||||
),
|
||||
onClick = clickIntents::onOrganizeTokensClick,
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ private fun ActionButtons(buttons: ImmutableList<TangemButtonUM>) {
|
|||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
SecondaryTangemButton(
|
||||
iconRes = button.iconRes,
|
||||
tangemIconUM = button.tangemIconUM,
|
||||
onClick = button.onClick,
|
||||
isEnabled = button.isEnabled,
|
||||
shape = TangemButtonShape.Rounded,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue