remove redundant package names in calls

This commit is contained in:
InsanusMokrassar 2022-01-12 16:33:46 +06:00
parent a70256cdaf
commit 8aaa83f57d
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
package dev.inmo.jsuikit package dev.inmo.jsuikit
import dev.inmo.jsuikit.modifers.AttributeValue
import org.jetbrains.compose.web.attributes.AttrsBuilder import org.jetbrains.compose.web.attributes.AttrsBuilder
class UIKitAttributeValueBuilder { class UIKitAttributeValueBuilder {
@ -11,7 +12,7 @@ class UIKitAttributeValueBuilder {
} }
} }
infix fun String.to(other: dev.inmo.jsuikit.modifers.AttributeValue?) { infix fun String.to(other: AttributeValue?) {
this to other ?.name this to other ?.name
} }

View File

@ -1,6 +1,6 @@
package dev.inmo.jsuikit.modifers package dev.inmo.jsuikit.modifers
sealed class UIKitAnimation (name: String) : UIKitModifier, dev.inmo.jsuikit.modifers.AttributeValue(name) { sealed class UIKitAnimation (name: String) : UIKitModifier, AttributeValue(name) {
override val classes: Array<String> = arrayOf("uk-animation-$name") override val classes: Array<String> = arrayOf("uk-animation-$name")
object Fade : UIKitAnimation("fade") object Fade : UIKitAnimation("fade")

View File

@ -7,7 +7,7 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier {
object Grid : UIKitDropdown("uk-dropdown-grid") object Grid : UIKitDropdown("uk-dropdown-grid")
sealed class Position(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { sealed class Position(name: String) : AttributeValue(name) {
sealed class Bottom(name: String) : Position("bottom-$name") { sealed class Bottom(name: String) : Position("bottom-$name") {
@ -45,14 +45,14 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier {
} }
sealed class Mode(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { sealed class Mode(name: String) : AttributeValue(name) {
object Click : Mode("click") object Click : Mode("click")
object Hover : Mode("hover") object Hover : Mode("hover")
} }
sealed class Flip(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { sealed class Flip(name: String) : AttributeValue(name) {
object True : Flip("true") object True : Flip("true")
object False : Flip("false") object False : Flip("false")