Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.kt
  • Loading branch information
HowieHChen committed Oct 19, 2024
2 parents 3d14b30 + d2f1a94 commit 7b0090c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
3 changes: 2 additions & 1 deletion composeApp/src/commonMain/kotlin/MainPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ fun MainPage(
) {
item {
SearchBar(
modifier = Modifier.padding(horizontal = 12.dp, vertical = 10.dp),
modifier = Modifier
.padding(start = 12.dp, end = 12.dp, top = 12.dp, bottom = 6.dp),
inputField = {
InputField(
query = miuixSearchValue,
Expand Down
29 changes: 16 additions & 13 deletions composeApp/src/commonMain/kotlin/SecondPage.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import top.yukonga.miuix.kmp.basic.Card
import top.yukonga.miuix.kmp.basic.LazyColumn
import top.yukonga.miuix.kmp.basic.ScrollBehavior
import top.yukonga.miuix.kmp.extra.SuperDropdown
Expand All @@ -22,18 +22,21 @@ fun SecondPage(
contentPadding = PaddingValues(top = padding.calculateTopPadding()),
topAppBarScrollBehavior = topAppBarScrollBehavior
) {
items(20) {
SuperDropdown(
title = "Dropdown",
summary = "Popup near click",
items = dropdownOptions,
selectedIndex = dropdownSelectedOption.value,
onSelectedIndexChange = { newOption -> dropdownSelectedOption.value = newOption },
horizontalPadding = 12.dp
)
}
item {
Spacer(modifier = Modifier.height(padding.calculateBottomPadding()))
Card(
modifier = Modifier
.padding(horizontal = 12.dp)
.padding(top = 12.dp, bottom = 12.dp + padding.calculateBottomPadding())
) {
for (i in 0 until 20) {
SuperDropdown(
title = "Dropdown",
items = dropdownOptions,
selectedIndex = dropdownSelectedOption.value,
onSelectedIndexChange = { newOption -> dropdownSelectedOption.value = newOption }
)
}
}
}
}
}

0 comments on commit 7b0090c

Please sign in to comment.