Skip to content

Commit faa6b24

Browse files
committed
fix: add full width parameter to secondary button
1 parent ea0b247 commit faa6b24

File tree

1 file changed

+2
-1
lines changed
  • app/src/main/java/to/bitkit/ui/components

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ fun SecondaryButton(
9494
isLoading: Boolean = false,
9595
size: ButtonSize = ButtonSize.Large,
9696
enabled: Boolean = true,
97+
fullWidth: Boolean = true,
9798
) {
9899
OutlinedButton(
99100
onClick = onClick,
@@ -102,7 +103,7 @@ fun SecondaryButton(
102103
contentPadding = PaddingValues(horizontal = size.horizontalPadding),
103104
border = BorderStroke(2.dp, if (enabled) Colors.White16 else Color.Transparent),
104105
modifier = Modifier
105-
.fillMaxWidth()
106+
.then(if (fullWidth) Modifier.fillMaxWidth() else Modifier)
106107
.height(size.height)
107108
.then(modifier)
108109
) {

0 commit comments

Comments
 (0)