Fixes in UIKitWidth

This commit is contained in:
InsanusMokrassar 2022-01-26 13:20:14 +06:00
parent 68d1ba6a37
commit a3c8cdcc96
3 changed files with 33 additions and 17 deletions

View File

@ -2,6 +2,8 @@
## 0.0.28 ## 0.0.28
* Fixes in `UIKitWidth`
## 0.0.27 ## 0.0.27
* `TextField` has been renamed to `StandardInput` * `TextField` has been renamed to `StandardInput`

View File

@ -0,0 +1,14 @@
package dev.inmo.jsuikit.modifiers
sealed class UIKitBase(classname: String) : UIKitModifier {
override val classes: Array<String> = arrayOf(classname)
sealed class Heading(suffix: String) : UIKitBase("uk-h$suffix") {
object H1 : Heading("1")
object H2 : Heading("2")
object H3 : Heading("3")
object H4 : Heading("4")
object H5 : Heading("5")
object H6 : Heading("6")
}
}

View File

@ -1,29 +1,29 @@
package dev.inmo.jsuikit.modifiers package dev.inmo.jsuikit.modifiers
sealed class UIKitWidth(classname: String) : UIKitModifier { sealed class UIKitWidth(classname: String) : UIKitModifier {
override val classes: Array<String> = arrayOf("uk-width-$classname") override val classes: Array<String> = arrayOf(classname)
object Auto : UIKitWidth("auto") object Auto : UIKitWidth("uk-width-auto")
object Expand : UIKitWidth("expand") object Expand : UIKitWidth("uk-width-expand")
object Full : UIKitWidth("1-1") object Full : UIKitWidth("uk-width-1-1")
object Half : UIKitWidth("1-2") object Half : UIKitWidth("uk-width-1-2")
object OneThird : UIKitWidth("1-3") object OneThird : UIKitWidth("uk-width-1-3")
object TwoThird : UIKitWidth("2-3") object TwoThird : UIKitWidth("uk-width-2-3")
object OneFourth : UIKitWidth("1-4") object OneFourth : UIKitWidth("uk-width-1-4")
object ThreeFourth : UIKitWidth("3-4") object ThreeFourth : UIKitWidth("uk-width-3-4")
object OneFifth : UIKitWidth("1-5") object OneFifth : UIKitWidth("uk-width-1-5")
object TwoFifth : UIKitWidth("2-5") object TwoFifth : UIKitWidth("uk-width-2-5")
object ThreeFifth : UIKitWidth("3-5") object ThreeFifth : UIKitWidth("uk-width-3-5")
object FourFifth : UIKitWidth("4-5") object FourFifth : UIKitWidth("uk-width-4-5")
object OneSixth : UIKitWidth("1-6") object OneSixth : UIKitWidth("uk-width-1-6")
object FiveSixth : UIKitWidth("5-6") object FiveSixth : UIKitWidth("uk-width-5-6")
sealed class Child(suffix: String) : UIKitWidth("child-$suffix") { sealed class Child(suffix: String) : UIKitWidth("uk-child-width-$suffix") {
object Full : Child("1-1") object Full : Child("1-1")
object Half : Child("1-2") object Half : Child("1-2")
@ -57,7 +57,7 @@ sealed class UIKitWidth(classname: String) : UIKitModifier {
} }
} }
sealed class Fixed(suffix: String) : UIKitWidth("fixed-$suffix") { sealed class Fixed(suffix: String) : UIKitWidth("uk-width-fixed-$suffix") {
object Small : Fixed("small") object Small : Fixed("small")
object Medium : Fixed("medium") object Medium : Fixed("medium")