Skip to content

Commit 8bcd017

Browse files
committed
chore(currency-creator): add description display to review screen
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 91275aa commit 8bcd017

1 file changed

Lines changed: 27 additions & 9 deletions

File tree

  • apps/flipcash/features/currency-creator/src/main/kotlin/com/flipcash/app/currencycreator/internal/screens

apps/flipcash/features/currency-creator/src/main/kotlin/com/flipcash/app/currencycreator/internal/screens/ReviewAndPurchaseScreen.kt

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ import androidx.compose.foundation.layout.fillMaxSize
66
import androidx.compose.foundation.layout.fillMaxWidth
77
import androidx.compose.foundation.layout.navigationBarsPadding
88
import androidx.compose.foundation.layout.padding
9+
import androidx.compose.material3.Text
910
import androidx.compose.runtime.Composable
1011
import androidx.compose.runtime.LaunchedEffect
1112
import androidx.compose.runtime.getValue
1213
import androidx.compose.ui.Alignment
1314
import androidx.compose.ui.Modifier
1415
import androidx.compose.ui.res.stringResource
16+
import androidx.compose.ui.text.style.TextAlign
17+
import androidx.compose.ui.text.style.TextOverflow
1518
import androidx.lifecycle.compose.collectAsStateWithLifecycle
1619
import com.flipcash.app.bills.RenderedBill
1720
import com.flipcash.app.core.tokens.CurrencyCreatorResult
@@ -63,7 +66,6 @@ internal fun ReviewAndPurchaseContent(
6366
.fillMaxWidth()
6467
.navigationBarsPadding()
6568
.padding(
66-
top = CodeTheme.dimens.grid.x6,
6769
bottom = CodeTheme.dimens.grid.x3
6870
),
6971
text = stringResource(
@@ -90,19 +92,35 @@ internal fun ReviewAndPurchaseContent(
9092
horizontalAlignment = Alignment.CenterHorizontally,
9193
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x5),
9294
) {
93-
TokenIconWithName(
94-
tokenName = state.nameFieldState.text.toString(),
95-
tokenImage = state.icon.dataOrNull,
96-
imageSize = CodeTheme.dimens.staticGrid.x6,
97-
textStyle = CodeTheme.typography.displaySmall,
98-
spacing = CodeTheme.dimens.grid.x2,
99-
)
95+
Column(
96+
modifier = Modifier.fillMaxWidth()
97+
.padding(horizontal = CodeTheme.dimens.grid.x2),
98+
horizontalAlignment = Alignment.CenterHorizontally,
99+
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x3),
100+
) {
101+
TokenIconWithName(
102+
tokenName = state.nameFieldState.text.toString(),
103+
tokenImage = state.icon.dataOrNull,
104+
imageSize = CodeTheme.dimens.staticGrid.x6,
105+
textStyle = CodeTheme.typography.displaySmall,
106+
spacing = CodeTheme.dimens.grid.x2,
107+
)
108+
109+
Text(
110+
modifier = Modifier.fillMaxWidth(),
111+
text = state.descriptionFieldState.text.toString(),
112+
style = CodeTheme.typography.textSmall,
113+
color = CodeTheme.colors.textSecondary,
114+
maxLines = 2,
115+
overflow = TextOverflow.Ellipsis,
116+
textAlign = TextAlign.Center,
117+
)
118+
}
100119

101120
state.bill?.let { bill ->
102121
RenderedBill(
103122
modifier = Modifier
104123
.weight(1f)
105-
.padding(top = CodeTheme.dimens.grid.x3)
106124
.fillMaxWidth()
107125
.sharedBoundsTransition(
108126
transition = SharedTransition.CurrencyBill

0 commit comments

Comments
 (0)