mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Remove parameter override
This commit is contained in:
parent
0c9ca4a8f9
commit
a7e9949d44
@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.padding
|
|||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.looker.droidify.ui.compose.utils.CustomChip
|
import com.looker.droidify.ui.compose.utils.CustomChip
|
||||||
@ -17,10 +18,7 @@ fun PermissionGrid(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
permissions: List<String>
|
permissions: List<String>
|
||||||
) {
|
) {
|
||||||
StaggeredGrid(
|
StaggeredGrid(modifier = modifier.horizontalScroll(rememberScrollState())) {
|
||||||
modifier = modifier.horizontalScroll(rememberScrollState()),
|
|
||||||
rows = 2
|
|
||||||
) {
|
|
||||||
permissions.forEach {
|
permissions.forEach {
|
||||||
CustomChip(modifier = Modifier.padding(horizontal = 2.dp), text = it)
|
CustomChip(modifier = Modifier.padding(horizontal = 2.dp), text = it)
|
||||||
}
|
}
|
||||||
@ -32,10 +30,11 @@ fun AntiFeaturesGrid(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
antiFeatures: List<String>
|
antiFeatures: List<String>
|
||||||
) {
|
) {
|
||||||
StaggeredGrid(
|
val scrollState = rememberScrollState()
|
||||||
modifier = modifier.horizontalScroll(rememberScrollState()),
|
LaunchedEffect(Unit) {
|
||||||
rows = 2
|
scrollState.animateScrollTo(4)
|
||||||
) {
|
}
|
||||||
|
StaggeredGrid(modifier = modifier.horizontalScroll(scrollState)) {
|
||||||
antiFeatures.forEach {
|
antiFeatures.forEach {
|
||||||
CustomChip(
|
CustomChip(
|
||||||
modifier = Modifier.padding(horizontal = 2.dp),
|
modifier = Modifier.padding(horizontal = 2.dp),
|
||||||
|
@ -8,7 +8,7 @@ import kotlin.math.max
|
|||||||
@Composable
|
@Composable
|
||||||
fun StaggeredGrid(
|
fun StaggeredGrid(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
rows: Int = 3,
|
rows: Int = 2,
|
||||||
content: @Composable () -> Unit
|
content: @Composable () -> Unit
|
||||||
) {
|
) {
|
||||||
Layout(
|
Layout(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user