mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Cleanup
This commit is contained in:
parent
1e9dd3f03a
commit
788735fbda
@ -5,7 +5,6 @@ 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
|
||||||
@ -30,11 +29,7 @@ fun AntiFeaturesGrid(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
antiFeatures: List<String>
|
antiFeatures: List<String>
|
||||||
) {
|
) {
|
||||||
val scrollState = rememberScrollState()
|
StaggeredGrid(modifier = modifier.horizontalScroll(rememberScrollState())) {
|
||||||
LaunchedEffect(Unit) {
|
|
||||||
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),
|
||||||
|
@ -14,6 +14,10 @@ import androidx.compose.ui.unit.Dp
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
// TODO: Rename
|
// TODO: Rename
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basically a OutlineChip without spamming "ExperimentalMaterialApi"
|
||||||
|
*/
|
||||||
@OptIn(ExperimentalMaterialApi::class)
|
@OptIn(ExperimentalMaterialApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun CustomChip(
|
fun CustomChip(
|
||||||
@ -41,4 +45,4 @@ fun CustomChip(
|
|||||||
) {
|
) {
|
||||||
Text(text = text, color = borderColor)
|
Text(text = text, color = borderColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user