Skip to content

Instantly share code, notes, and snippets.

@JyotimoyKashyap
Created April 12, 2025 07:33
Show Gist options
  • Select an option

  • Save JyotimoyKashyap/89c8d63a7979ce1f03a295996fa98d1f to your computer and use it in GitHub Desktop.

Select an option

Save JyotimoyKashyap/89c8d63a7979ce1f03a295996fa98d1f to your computer and use it in GitHub Desktop.
Icon Item
@Composable
fun IconItemView(iconItem: IconItem, onIconSelected: (String, ImageVector) -> Unit) {
Column(
modifier = Modifier
.padding(MaterialTheme.spacing.small)
.wrapContentSize()
) {
iconItem.image?.let {
Icon(
imageVector = it,
contentDescription = iconItem.id,
modifier = Modifier
.clickable {
onIconSelected(iconItem.id, it)
}
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment