mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-07 19:14:12 +08:00
style: optimize code in Dropdown
This commit is contained in:
@@ -310,17 +310,6 @@ fun DropdownMenuBox(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal expect fun DropdownMenuMeasureBox(
|
||||
menuMaxHeight: (Dp) -> Unit,
|
||||
content: @Composable BoxScope.() -> Unit
|
||||
)
|
||||
|
||||
@Stable
|
||||
interface DropdownMenuBoxScope : BoxWithConstraintsScope {
|
||||
val menuMaxHeight: Dp
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun DropdownMenuItem(
|
||||
onClick: () -> Unit,
|
||||
@@ -362,6 +351,17 @@ fun DropdownMenuItem(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
internal expect fun DropdownMenuMeasureBox(
|
||||
menuMaxHeight: (Dp) -> Unit,
|
||||
content: @Composable BoxScope.() -> Unit
|
||||
)
|
||||
|
||||
@Stable
|
||||
interface DropdownMenuBoxScope : BoxWithConstraintsScope {
|
||||
val menuMaxHeight: Dp
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun DropdownMenuContent(
|
||||
expandedStates: MutableTransitionState<Boolean>,
|
||||
|
Reference in New Issue
Block a user