mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 08:49:55 +00:00
Add: Repositories' compose recycler
This commit is contained in:
parent
9bf819f319
commit
fca3b7344e
@ -13,6 +13,7 @@ import com.looker.droidify.database.entity.Repository
|
||||
import com.looker.droidify.entity.ProductItem
|
||||
import com.looker.droidify.ui.compose.components.ProductCard
|
||||
import com.looker.droidify.ui.compose.components.ProductsListItem
|
||||
import com.looker.droidify.ui.compose.components.RepositoryItem
|
||||
|
||||
@Composable
|
||||
fun ProductsVerticalRecycler(
|
||||
@ -48,4 +49,21 @@ fun ProductsHorizontalRecycler(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun RepositoriesRecycler(
|
||||
repositoriesList: List<Repository>?,
|
||||
onClick: (Repository) -> Unit = {},
|
||||
onLongClick: (Repository) -> Unit = {}
|
||||
) {
|
||||
Surface(color = MaterialTheme.colorScheme.background) {
|
||||
LazyColumn(
|
||||
verticalArrangement = spacedBy(2.dp)
|
||||
) {
|
||||
items(repositoriesList ?: emptyList()) { repo ->
|
||||
RepositoryItem(repository = repo, onClick = onClick, onLongClick = onLongClick)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user