Skip to content

Instantly share code, notes, and snippets.

@5AbhishekSaxena
Created July 15, 2022 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5AbhishekSaxena/41c8377d0021e193347d2b2eccfc10c5 to your computer and use it in GitHub Desktop.
Save 5AbhishekSaxena/41c8377d0021e193347d2b2eccfc10c5 to your computer and use it in GitHub Desktop.
@Composable
fun UIWithButton(buttonItem: ButtonItem): Button {
return Button().apply {
enabled = buttonItem.onClickStrategy !is OnClickStrategy.None
setOnClickListener { buttonItem.onClickStrategy.onClick() }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment