Skip to content

Commit

Permalink
discounts smol ui fix
Browse files Browse the repository at this point in the history
  • Loading branch information
panasetskaya committed Nov 14, 2024
1 parent fac7f27 commit 3f11bb6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ private fun DiscountRow(discount: Discount, modifier: Modifier = Modifier) {
Discount.ExpiredState.NotExpired -> {}
}
},
spaceBetween = 16.dp,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package com.hedvig.android.feature.payments.discounts
import android.content.ClipData
import android.content.ClipboardManager
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
Expand Down Expand Up @@ -213,7 +215,7 @@ private fun ForeverSection(
)
},
)
Spacer(modifier = Modifier.height(16.dp))
Spacer(modifier = Modifier.height(8.dp))
val context = LocalContext.current
HorizontalItemsWithMaximumSpaceTaken(
startSlot = {
Expand All @@ -238,13 +240,18 @@ private fun ForeverSection(
}
},
endSlot = {
Text(
stringResource(
R.string.OFFER_COST_AND_PREMIUM_PERIOD_ABBREVIATION,
"-${foreverInformation.currentMonthlyDiscountFromForever}",
),
textAlign = TextAlign.End,
)
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.End,
) {
Text(
stringResource(
R.string.OFFER_COST_AND_PREMIUM_PERIOD_ABBREVIATION,
"-${foreverInformation.currentMonthlyDiscountFromForever}",
),
textAlign = TextAlign.End,
)
}
},
spaceBetween = 8.dp,
)
Expand Down Expand Up @@ -299,7 +306,7 @@ private fun PaymentDetailsScreenPreview(
),
Discount(
"MYDISCOUNT3",
"display name of expiring soon",
"display name of expiring soon soon soon soon soon",
"description",
Discount.ExpiredState.ExpiringInTheFuture(LocalDate(2124, 12, 14)),
UiMoney(10.0, UiCurrencyCode.SEK),
Expand Down

0 comments on commit 3f11bb6

Please sign in to comment.