Created
March 25, 2022 12:26
-
-
Save agammahajan1/358111a3c22c6961dfc52edd89ef0c24 to your computer and use it in GitHub Desktop.
This file contains 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 ApplyButton( | |
text: String, | |
modifier: Modifier = Modifier, | |
applicable: Boolean = false, | |
spanStyle: SpanStyle, | |
paragraphStyle: ParagraphStyle, | |
style: TextStyle, | |
onClick: () -> Unit | |
) { | |
ClickableText( | |
text = AnnotatedString( | |
text = text, | |
spanStyle = spanStyle, | |
paragraphStyle = paragraphStyle | |
), | |
onClick = { | |
if (applicable) { | |
onClick.invoke() | |
} | |
}, | |
modifier = modifier, | |
style = style | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment