diff --git a/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt index 26d5882..53331d3 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt @@ -1,5 +1,6 @@ package dev.inmo.jsuikit +import dev.inmo.jsuikit.modifers.AttributeValue import org.jetbrains.compose.web.attributes.AttrsBuilder 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 } diff --git a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt index c8de563..6fb5be1 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt @@ -1,6 +1,6 @@ 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 = arrayOf("uk-animation-$name") object Fade : UIKitAnimation("fade") diff --git a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt index 9131610..3ac76b3 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt @@ -7,7 +7,7 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier { 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") { @@ -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 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 False : Flip("false")