mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-27 19:17:15 +00:00
commit
4479d9b0f9
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 0.0.31
|
||||
|
||||
* Support of `UIKitVisibility`
|
||||
|
||||
## 0.0.30
|
||||
|
||||
* Add `UIKitComment`
|
||||
|
@ -9,4 +9,4 @@ android.enableJetifier=true
|
||||
# Project data
|
||||
|
||||
group=dev.inmo
|
||||
version=0.0.30
|
||||
version=0.0.31
|
||||
|
@ -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