mirror of
https://github.com/mihonapp/mihon.git
synced 2024-10-31 21:20:59 -04:00
29 lines
949 B
Kotlin
29 lines
949 B
Kotlin
|
package eu.kanade.presentation.components
|
||
|
|
||
|
import androidx.compose.foundation.layout.ColumnScope
|
||
|
import androidx.compose.foundation.layout.sizeIn
|
||
|
import androidx.compose.runtime.Composable
|
||
|
import androidx.compose.ui.Modifier
|
||
|
import androidx.compose.ui.unit.DpOffset
|
||
|
import androidx.compose.ui.unit.dp
|
||
|
import androidx.compose.ui.window.PopupProperties
|
||
|
import androidx.compose.material3.DropdownMenu as ComposeDropdownMenu
|
||
|
|
||
|
@Composable
|
||
|
fun DropdownMenu(
|
||
|
expanded: Boolean,
|
||
|
onDismissRequest: () -> Unit,
|
||
|
modifier: Modifier = Modifier,
|
||
|
properties: PopupProperties = PopupProperties(focusable = true),
|
||
|
content: @Composable ColumnScope.() -> Unit,
|
||
|
) {
|
||
|
ComposeDropdownMenu(
|
||
|
expanded = expanded,
|
||
|
onDismissRequest = onDismissRequest,
|
||
|
modifier = modifier.sizeIn(minWidth = 196.dp, maxWidth = 196.dp),
|
||
|
offset = DpOffset(8.dp, (-8).dp),
|
||
|
properties = properties,
|
||
|
content = content,
|
||
|
)
|
||
|
}
|