Skip to content

Commit f7f32e2

Browse files
committed
feat: new style swipe
1 parent 7ab5328 commit f7f32e2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import kotlinx.coroutines.delay
4949
import kotlinx.coroutines.launch
5050
import to.bitkit.R
5151
import to.bitkit.ui.scaffold.ScreenColumn
52+
import to.bitkit.ui.shared.util.primaryButtonStyle
5253
import to.bitkit.ui.theme.AppThemeSurface
5354
import to.bitkit.ui.theme.Colors
5455
import kotlin.math.roundToInt
@@ -61,7 +62,7 @@ private val Padding = 8.dp
6162
@Composable
6263
fun SwipeToConfirm(
6364
text: String = stringResource(R.string.other__swipe),
64-
color: Color = Colors.Green,
65+
color: Color = Colors.Brand,
6566
icon: ImageVector = Icons.AutoMirrored.Default.ArrowForward,
6667
@DrawableRes endIcon: Int = R.drawable.ic_check,
6768
endIconTint: Color = Colors.Black,
@@ -97,7 +98,10 @@ fun SwipeToConfirm(
9798
modifier = modifier
9899
.requiredHeight(CircleSize + Padding * 2)
99100
.clip(CircleShape)
100-
.background(Color.White.copy(alpha = 0.16f))
101+
.primaryButtonStyle(
102+
isEnabled = !loading,
103+
shape = CircleShape,
104+
)
101105
.padding(Padding)
102106
) {
103107
Box(
@@ -223,7 +227,7 @@ private fun Preview() {
223227
) {
224228
SwipeToConfirm(
225229
text = stringResource(R.string.wallet__send_swipe),
226-
color = Colors.Green,
230+
color = Colors.Brand,
227231
loading = isLoading,
228232
onConfirm = {
229233
scope.launch {

0 commit comments

Comments
 (0)