mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-08 11:34:18 +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
|
@Composable
|
||||||
fun DropdownMenuItem(
|
fun DropdownMenuItem(
|
||||||
onClick: () -> Unit,
|
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
|
@Composable
|
||||||
private fun DropdownMenuContent(
|
private fun DropdownMenuContent(
|
||||||
expandedStates: MutableTransitionState<Boolean>,
|
expandedStates: MutableTransitionState<Boolean>,
|
||||||
|
Reference in New Issue
Block a user