add support of sections

This commit is contained in:
InsanusMokrassar 2022-05-19 13:42:21 +06:00
parent 29efe4b5cd
commit 3afe6c2815
3 changed files with 32 additions and 1 deletions

View File

@ -2,6 +2,7 @@
## 0.1.3
* Add support of sections
* Improve support of navbars
## 0.1.2

View File

@ -0,0 +1,23 @@
package dev.inmo.jsuikit.modifiers
sealed class UIKitSection(vararg classes: String) : UIKitModifier {
override val classes: Array<String> = classes as Array<String>
sealed class Style(suffix: String) : UIKitSection("uk-section-$suffix") {
object Default : Style("default")
object Muted : Style("muted")
object Primary : Style("primary")
object Secondary : Style("secondary")
}
sealed class Size(suffix: String) : UIKitSection("uk-section-$suffix") {
object XSmall : Size("xsmall")
object Small : Size("small")
object Large : Size("large")
object XLarge : Size("xlarge")
}
object Overlap : UIKitSection("uk-section-overlap")
companion object : UIKitSection("uk-section")
}

View File

@ -38,7 +38,10 @@ sealed class UIKitUtility(classname: String) : UIKitModifier {
object Width : Responsive("width")
object Height : Responsive("height")
}
object PreserveWidth : UIKitUtility("uk-preserve-width")
sealed class Preserve(suffix: String) : UIKitUtility("uk-preserve-$suffix") {
object Width : Preserve("width")
object Color : Preserve("color")
}
sealed class Border(suffix: String) : UIKitUtility("uk-border-$suffix") {
object Rounded : Border("rounded")
@ -112,4 +115,8 @@ sealed class UIKitUtility(classname: String) : UIKitModifier {
object Open : UIKitUtility("uk-open")
object Link : UIKitUtility("uk-link")
companion object {
val PreserveWidth = Preserve.Width
}
}