Skip to content

Commit d3c6318

Browse files
committed
fix: ripple effect
1 parent 1bc7742 commit d3c6318

File tree

1 file changed

+13
-5
lines changed
  • app/src/main/java/to/bitkit/ui/components

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,24 @@ fun PrimaryButton(
7272
containerColor = Color.Transparent,
7373
disabledContainerColor = Color.Transparent
7474
),
75-
contentPadding = contentPadding,
75+
contentPadding = PaddingValues(0.dp),
7676
shape = buttonShape,
7777
modifier = Modifier
7878
.then(if (fullWidth) Modifier.fillMaxWidth() else Modifier)
7979
.requiredHeight(size.height)
80-
.primaryButtonStyle(
81-
isEnabled = enabled && !isLoading,
82-
shape = buttonShape
83-
)
8480
.then(modifier)
8581
) {
82+
Box(
83+
contentAlignment = Alignment.Center,
84+
modifier = Modifier
85+
.fillMaxWidth()
86+
.requiredHeight(size.height)
87+
.primaryButtonStyle(
88+
isEnabled = enabled && !isLoading,
89+
shape = buttonShape
90+
)
91+
.padding(contentPadding)
92+
) {
8693
if (isLoading) {
8794
CircularProgressIndicator(
8895
color = Colors.White32,
@@ -108,6 +115,7 @@ fun PrimaryButton(
108115
}
109116
}
110117
}
118+
}
111119
}
112120
}
113121

0 commit comments

Comments
 (0)