Updated on 2026-08-14
This commit is contained in:
parent
592bc82e98
commit
618810718e
3 changed files with 22 additions and 2 deletions
|
|
@ -2,11 +2,14 @@ package com.tangem.features.feed.ui.market.detailed.components
|
|||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
|
|
@ -19,6 +22,7 @@ import com.tangem.core.ui.components.RectangleShimmer
|
|||
import com.tangem.core.ui.components.SpacerW4
|
||||
import com.tangem.core.ui.components.TextShimmer
|
||||
import com.tangem.core.ui.components.text.TooltipText
|
||||
import com.tangem.core.ui.extensions.conditional
|
||||
import com.tangem.core.ui.extensions.resolveReference
|
||||
import com.tangem.core.ui.extensions.stringReference
|
||||
import com.tangem.core.ui.res.LocalRedesignEnabled
|
||||
|
|
@ -89,8 +93,19 @@ private fun InfoPointV1(infoPointUM: InfoPointUM, modifier: Modifier = Modifier)
|
|||
|
||||
@Composable
|
||||
private fun InfoPointV2(infoPointUM: InfoPointUM, modifier: Modifier = Modifier) {
|
||||
val interactionSource = remember { MutableInteractionSource() }
|
||||
Column(
|
||||
modifier = modifier.padding(vertical = TangemTheme.dimens.spacing8),
|
||||
modifier = modifier
|
||||
.conditional(
|
||||
condition = infoPointUM.onInfoClick != null,
|
||||
modifier = {
|
||||
clickable(
|
||||
interactionSource = interactionSource,
|
||||
onClick = { infoPointUM.onInfoClick?.invoke() },
|
||||
)
|
||||
},
|
||||
)
|
||||
.padding(vertical = TangemTheme.dimens.spacing8),
|
||||
horizontalAlignment = Alignment.Start,
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import com.tangem.features.feed.ui.market.detailed.state.TrendingVolumeLiquidity
|
|||
@Composable
|
||||
internal fun MarketCapCard(item: InfoPointUMV2.MarketCap) {
|
||||
MetricsCard(
|
||||
onClick = item.onInfoClick,
|
||||
modifier = Modifier
|
||||
.heightIn(104.dp)
|
||||
.fillMaxWidth(),
|
||||
|
|
@ -68,6 +69,7 @@ internal fun TradingVolumeCard(item: InfoPointUMV2.TradingVolume) {
|
|||
modifier = Modifier
|
||||
.heightIn(104.dp)
|
||||
.fillMaxWidth(),
|
||||
onClick = item.onInfoClick,
|
||||
title = {
|
||||
Row {
|
||||
MetricValueText(item.tradingValue)
|
||||
|
|
@ -113,6 +115,7 @@ internal fun MarketPositionCard(item: InfoPointUMV2.MarketPosition) {
|
|||
modifier = Modifier
|
||||
.heightIn(104.dp)
|
||||
.fillMaxWidth(),
|
||||
onClick = item.onInfoClick,
|
||||
title = {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
MarketPositionValue(position = item.position, ratingColor = ratingColor)
|
||||
|
|
@ -151,6 +154,7 @@ internal fun FDVCard(item: InfoPointUMV2.FullyDilutedValuation) {
|
|||
modifier = Modifier
|
||||
.heightIn(104.dp)
|
||||
.fillMaxWidth(),
|
||||
onClick = item.onInfoClick,
|
||||
title = {
|
||||
if (item.fullyDilutedValuationChange24 != null) {
|
||||
Row {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.tangem.features.feed.ui.market.detailed.components
|
|||
|
||||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -81,7 +82,7 @@ private fun SecurityScoreBlockV1(state: SecurityScoreUM, modifier: Modifier = Mo
|
|||
@Composable
|
||||
private fun SecurityScoreBlockV2(state: SecurityScoreUM, modifier: Modifier = Modifier) {
|
||||
TokenMarketInformationBlock(
|
||||
modifier = modifier,
|
||||
modifier = modifier.clickable(onClick = state.onInfoClick),
|
||||
title = {
|
||||
TangemRowContainer(contentPadding = PaddingValues()) {
|
||||
Text(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue