mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 11:22:12 +00:00
Add: BaseDialog composable
This commit is contained in:
parent
5aba54ab37
commit
3a67085da1
@ -0,0 +1,21 @@
|
||||
package com.machiav3lli.fdroid.ui.dialog
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
fun BaseDialog(
|
||||
openDialogCustom: MutableState<Boolean>,
|
||||
dialogUI: @Composable (() -> Unit)
|
||||
) {
|
||||
Dialog(
|
||||
onDismissRequest = { openDialogCustom.value = false },
|
||||
properties = DialogProperties(usePlatformDefaultWidth = false)
|
||||
) {
|
||||
dialogUI()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user