Created
April 24, 2024 10:42
-
-
Save philipplackner/61a9e21f88aba70c8a74b3b7adabf5d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun PostFilterButton( | |
text: String, | |
selected: Boolean, | |
onClick: () -> Unit, | |
modifier: Modifier = Modifier | |
) { | |
Button( | |
onClick = onClick, | |
shape = RoundedCornerShape(50f), | |
colors = ButtonDefaults.buttonColors( | |
containerColor = if (selected) SparkyOrange else Color.Transparent, | |
contentColor = SparkyDarkGray | |
), | |
border = if (selected) { | |
null | |
} else BorderStroke(width = 0.25.dp, color = SparkyDarkGray), | |
modifier = modifier | |
.padding(vertical = 16.dp) | |
) { | |
Text( | |
text = text | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment