mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-22 00:27:25 +00:00
UIKitVisibility
This commit is contained in:
parent
15340eadb1
commit
cef131b1d0
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.0.31
|
## 0.0.31
|
||||||
|
|
||||||
|
* Support of `UIKitVisibility`
|
||||||
|
|
||||||
## 0.0.30
|
## 0.0.30
|
||||||
|
|
||||||
* Add `UIKitComment`
|
* Add `UIKitComment`
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package dev.inmo.jsuikit.modifiers
|
||||||
|
|
||||||
|
sealed class UIKitVisibility(classname: String) : UIKitModifier {
|
||||||
|
override val classes: Array<String> = arrayOf(classname)
|
||||||
|
|
||||||
|
sealed class Hidden(suffix: String?) : UIKitModifier {
|
||||||
|
override val classes: Array<String> = arrayOf("uk-hidden${suffix ?.let { "-$it" } ?: ""}")
|
||||||
|
|
||||||
|
object Hover : Hidden("hover")
|
||||||
|
sealed class Touch(suffix: String?) : Hidden(suffix) {
|
||||||
|
override val classes: Array<String> = arrayOf("${suffix ?: ""}touch")
|
||||||
|
|
||||||
|
object No : Touch("no")
|
||||||
|
|
||||||
|
companion object : Touch(null)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object : Hidden(null) {
|
||||||
|
val NoTouch = Touch.No
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sealed class Invisible(suffix: String?) : UIKitModifier {
|
||||||
|
override val classes: Array<String> = arrayOf("uk-invisible${suffix ?.let { "-$it" } ?: ""}")
|
||||||
|
|
||||||
|
object Hover : Invisible("hover")
|
||||||
|
|
||||||
|
companion object : Invisible(null)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user