All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skikoMain.io.github.lyxnx.compose.compodals.Platform.desktop.kt Maven / Gradle / Ivy

package io.github.lyxnx.compose.compodals

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.window.Popup
import androidx.compose.ui.window.PopupProperties

public actual enum class SecureFlagPolicy {
    Inherit
}

@Composable
internal actual fun CompodalHost(
    onDismiss: () -> Unit,
    properties: CompodalProperties,
    content: @Composable () -> Unit,
) {
    val popupProperties = remember(properties) {
        PopupProperties(
            dismissOnBackPress = properties.dismissOnBackPress,
            dismissOnClickOutside = properties.dismissOnTouchOutside
        )
    }

    Popup(
        onDismissRequest = onDismiss,
        properties = popupProperties
    ) {
        content()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy