Skip to content

Commit b6e7c5c

Browse files
committed
refactor: remove secondary button wrapper
1 parent 88469c2 commit b6e7c5c

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

app/src/main/java/to/bitkit/ui/components/NumberPadActionButton.kt

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package to.bitkit.ui.components
22

33
import androidx.annotation.DrawableRes
4-
import androidx.compose.foundation.BorderStroke
4+
import androidx.compose.foundation.border
55
import androidx.compose.foundation.layout.Arrangement
66
import androidx.compose.foundation.layout.Column
77
import androidx.compose.foundation.layout.PaddingValues
@@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.size
1212
import androidx.compose.foundation.shape.RoundedCornerShape
1313
import androidx.compose.material3.Button
1414
import androidx.compose.material3.Icon
15-
import androidx.compose.material3.OutlinedButton
1615
import androidx.compose.runtime.Composable
1716
import androidx.compose.ui.Alignment
1817
import androidx.compose.ui.Modifier
@@ -76,32 +75,30 @@ fun NumberPadActionButton(
7675
}
7776
}
7877
} else {
79-
OutlinedButton(
80-
onClick = {},
81-
shape = buttonShape,
82-
colors = AppButtonDefaults.secondaryColors,
83-
contentPadding = contentPadding,
84-
border = BorderStroke(width = 1.dp, color = color),
78+
Row(
79+
verticalAlignment = Alignment.CenterVertically,
80+
horizontalArrangement = Arrangement.spacedBy(8.dp),
8581
modifier = modifier
8682
.requiredHeight(height)
87-
) {
88-
Row(
89-
verticalAlignment = Alignment.CenterVertically,
90-
horizontalArrangement = Arrangement.spacedBy(8.dp),
91-
) {
92-
if (icon != null) {
93-
Icon(
94-
painter = painterResource(icon),
95-
contentDescription = text,
96-
tint = color,
97-
modifier = Modifier.size(16.dp)
98-
)
99-
}
100-
Caption13Up(
101-
text = text,
83+
.border(
84+
width = 1.dp,
10285
color = color,
86+
shape = buttonShape
87+
)
88+
.padding(contentPadding)
89+
) {
90+
if (icon != null) {
91+
Icon(
92+
painter = painterResource(icon),
93+
contentDescription = text,
94+
tint = color,
95+
modifier = Modifier.size(16.dp)
10396
)
10497
}
98+
Caption13Up(
99+
text = text,
100+
color = color,
101+
)
105102
}
106103
}
107104
}

0 commit comments

Comments
 (0)