File tree Expand file tree Collapse file tree 1 file changed +29
-16
lines changed
app/src/main/java/to/bitkit/ui/components Expand file tree Collapse file tree 1 file changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -217,25 +217,30 @@ fun TertiaryButton(
217217 modifier = Modifier .size(size.height / 2 )
218218 )
219219 } else {
220- if (icon != null ) {
221- Box (
222- modifier = if (enabled) {
223- Modifier
224- } else {
225- Modifier .graphicsLayer {
226- colorFilter = ColorFilter .tint(Colors .White06 )
220+ Row (
221+ verticalAlignment = Alignment .CenterVertically ,
222+ horizontalArrangement = Arrangement .spacedBy(8 .dp),
223+ ) {
224+ if (icon != null ) {
225+ Box (
226+ modifier = if (enabled) {
227+ Modifier
228+ } else {
229+ Modifier .graphicsLayer {
230+ colorFilter = ColorFilter .tint(Colors .White06 )
231+ }
227232 }
233+ ) {
234+ icon()
228235 }
229- ) {
230- icon()
231236 }
232- }
233- text?. let {
234- Text (
235- text = text ,
236- maxLines = 1 ,
237- overflow = TextOverflow . Ellipsis ,
238- )
237+ text?. let {
238+ Text (
239+ text = text,
240+ maxLines = 1 ,
241+ overflow = TextOverflow . Ellipsis ,
242+ )
243+ }
239244 }
240245 }
241246 }
@@ -467,6 +472,14 @@ private fun TertiaryButtonPreview() {
467472 TertiaryButton (
468473 text = " Tertiary Disabled" ,
469474 enabled = false ,
475+ icon = {
476+ Icon (
477+ imageVector = Icons .Filled .Favorite ,
478+ contentDescription = " " ,
479+ tint = Colors .Brand ,
480+ modifier = Modifier .size(16 .dp)
481+ )
482+ },
470483 onClick = {}
471484 )
472485 TertiaryButton (
You can’t perform that action at this time.
0 commit comments