commonMain.io.github.lyxnx.compose.compodals.CompodalProperties.kt Maven / Gradle / Ivy
package io.github.lyxnx.compose.compodals
/**
* Properties used by a root [Compodal]
*
* @property dismissOnBackPress whether to dismiss the modal window when pressing the back button (or back gesture)
* @property dismissOnTouchOutside whether to dismiss the modal when pressing outside the modal content bounds
* @property securePolicy [SecureFlagPolicy] to apply to the modal window
*
* @see Compodal
*/
public data class CompodalProperties(
val dismissOnBackPress: Boolean = DEFAULT_DISMISS_ON_BACK_PRESS,
val dismissOnTouchOutside: Boolean = DEFAULT_DISMISS_ON_TOUCH_OUTSIDE,
val securePolicy: SecureFlagPolicy = DEFAULT_SECURE_POLICY,
) {
public companion object {
public const val DEFAULT_DISMISS_ON_BACK_PRESS: Boolean = true
public const val DEFAULT_DISMISS_ON_TOUCH_OUTSIDE: Boolean = true
public val DEFAULT_SECURE_POLICY: SecureFlagPolicy = SecureFlagPolicy.Inherit
}
}