Skip to content

Instantly share code, notes, and snippets.

@widiarifki
Created August 30, 2021 03:27
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 widiarifki/5f5923c0a6a5f75ecdf803592c3faef6 to your computer and use it in GitHub Desktop.
Save widiarifki/5f5923c0a6a5f75ecdf803592c3faef6 to your computer and use it in GitHub Desktop.
@Preview(showBackground = true)
@Composable
fun PreviewShoppingListScreen() {
val previewItems = List(10) { index ->
ShoppingItem(id = index, name = "Item Preview $index")
}
MaterialTheme {
ShoppingListScreen(
isLoading = true,
shoppingItems = previewItems,
onAddItem = {},
onToggleTickItem = {},
onDeleteItem = {}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment