Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rahulsainani
Last active May 12, 2021 10:54
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 rahulsainani/4126f03fbe312cb9c2c00ba16be6e894 to your computer and use it in GitHub Desktop.
Save rahulsainani/4126f03fbe312cb9c2c00ba16be6e894 to your computer and use it in GitHub Desktop.
@Composable
fun FeatureTile(feature: Feature) {
Card(
shape = MaterialTheme.shapes.small,
modifier = Modifier
.size(Dimens.grid_6)
.aspectRatio(1f)
.padding(1.dp),
elevation = Dimens.plane_2
) {
Image(
painter = painterResource(id = feature.iconResource),
contentDescription = feature.contentDescription,
alignment = Alignment.Center,
modifier = Modifier.padding(Dimens.grid_1_5)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment