@@ -21,6 +21,7 @@ import com.getcode.theme.Gray50
2121import com.getcode.theme.White
2222import com.getcode.ui.components.CodeCircularProgressIndicator
2323import com.getcode.ui.components.Pill
24+ import com.getcode.ui.utils.addIf
2425import com.getcode.ui.utils.rememberedClickable
2526
2627@Composable
@@ -45,10 +46,9 @@ internal fun BillManagementOptions(
4546 if (primaryAction != null ) {
4647 Pill (
4748 modifier = Modifier
48- .rememberedClickable(enabled = ! isSending) { primaryAction.action() }
49- .padding(vertical = 15 .dp, horizontal = 20 .dp),
50- contentPadding = PaddingValues (),
51- backgroundColor = Gray50 ,
49+ .rememberedClickable(enabled = ! isSending) { primaryAction.action() },
50+ contentPadding = PaddingValues (15 .dp),
51+ backgroundColor = CodeTheme .colors.action,
5252 ) {
5353 Box {
5454 Row (
@@ -59,10 +59,12 @@ internal fun BillManagementOptions(
5959 contentDescription = " " ,
6060 modifier = Modifier .width(22 .dp)
6161 )
62- Text (
63- modifier = Modifier .padding(start = 10 .dp),
64- text = primaryAction.label
65- )
62+ primaryAction.label?.let { label ->
63+ Text (
64+ modifier = Modifier .padding(start = 10 .dp),
65+ text = label
66+ )
67+ }
6668 }
6769
6870 if (isSending) {
@@ -80,20 +82,21 @@ internal fun BillManagementOptions(
8082 if (secondaryAction != null ) {
8183 Pill (
8284 modifier = Modifier
83- .rememberedClickable(enabled = isInteractable) { secondaryAction.action() }
84- .padding(vertical = 15 .dp, horizontal = 20 .dp),
85- contentPadding = PaddingValues (),
86- backgroundColor = Gray50 ,
85+ .rememberedClickable(enabled = isInteractable) { secondaryAction.action() },
86+ contentPadding = PaddingValues (15 .dp),
87+ backgroundColor = CodeTheme .colors.action,
8788 ) {
8889 Image (
8990 painter = secondaryAction.asset,
9091 contentDescription = " " ,
9192 modifier = Modifier .size(18 .dp)
9293 )
93- Text (
94- modifier = Modifier .padding(start = 10 .dp),
95- text = secondaryAction.label
96- )
94+ secondaryAction.label?.let { label ->
95+ Text (
96+ modifier = Modifier .padding(start = 10 .dp),
97+ text = label
98+ )
99+ }
97100 }
98101 }
99102 }
0 commit comments