Updated on 2026-08-14
This commit is contained in:
parent
ca72e1e1ff
commit
8fdfc98a58
2 changed files with 55 additions and 25 deletions
|
|
@ -26,6 +26,7 @@ import kotlinx.collections.immutable.persistentListOf
|
|||
@Immutable
|
||||
class InformationBlockContentScope(val scope: BoxScope) : BoxScope by scope
|
||||
|
||||
// TODO: [REDACTED_JIRA]
|
||||
@Composable
|
||||
fun InformationBlock(
|
||||
title: @Composable BoxScope.() -> Unit,
|
||||
|
|
@ -40,15 +41,28 @@ fun InformationBlock(
|
|||
.background(color = TangemTheme.colors.background.action),
|
||||
horizontalAlignment = Alignment.Start,
|
||||
) {
|
||||
val minHeight = if (action == null) TangemTheme.dimens.size36 else TangemTheme.dimens.size40
|
||||
val padding = if (action == null) {
|
||||
PaddingValues(
|
||||
start = TangemTheme.dimens.spacing12,
|
||||
top = TangemTheme.dimens.spacing12,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing4,
|
||||
)
|
||||
} else {
|
||||
PaddingValues(
|
||||
start = TangemTheme.dimens.spacing12,
|
||||
top = TangemTheme.dimens.spacing11,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing5,
|
||||
)
|
||||
}
|
||||
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = TangemTheme.dimens.size40)
|
||||
.padding(
|
||||
top = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing6,
|
||||
)
|
||||
.padding(horizontal = TangemTheme.dimens.spacing12),
|
||||
.heightIn(min = minHeight)
|
||||
.padding(paddingValues = padding),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -56,30 +56,46 @@ internal fun DraggableNetworkGroupItem(
|
|||
)
|
||||
}
|
||||
|
||||
// TODO: [REDACTED_JIRA]
|
||||
@Composable
|
||||
private fun InternalNetworkGroupItem(
|
||||
networkName: String,
|
||||
modifier: Modifier = Modifier,
|
||||
endIcon: @Composable RowScope.() -> Unit = {},
|
||||
endIcon: @Composable (RowScope.() -> Unit)? = null,
|
||||
) {
|
||||
Column(modifier = modifier) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.background(TangemTheme.colors.background.primary)
|
||||
.padding(horizontal = TangemTheme.dimens.spacing12)
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = TangemTheme.dimens.size40),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.wallet_network_group_title, networkName),
|
||||
modifier = Modifier.padding(top = TangemTheme.dimens.spacing12, bottom = TangemTheme.dimens.spacing8),
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
endIcon()
|
||||
}
|
||||
val minHeight = if (endIcon == null) TangemTheme.dimens.size36 else TangemTheme.dimens.size40
|
||||
val padding = if (endIcon == null) {
|
||||
PaddingValues(
|
||||
start = TangemTheme.dimens.spacing12,
|
||||
top = TangemTheme.dimens.spacing12,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing4,
|
||||
)
|
||||
} else {
|
||||
PaddingValues(
|
||||
start = TangemTheme.dimens.spacing12,
|
||||
top = TangemTheme.dimens.spacing11,
|
||||
end = TangemTheme.dimens.spacing12,
|
||||
bottom = TangemTheme.dimens.spacing5,
|
||||
)
|
||||
}
|
||||
|
||||
Row(
|
||||
modifier = modifier
|
||||
.background(TangemTheme.colors.background.primary)
|
||||
.fillMaxWidth()
|
||||
.heightIn(min = minHeight)
|
||||
.padding(paddingValues = padding),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.wallet_network_group_title, networkName),
|
||||
style = TangemTheme.typography.subtitle2,
|
||||
color = TangemTheme.colors.text.tertiary,
|
||||
)
|
||||
|
||||
if (endIcon != null) endIcon()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue