fixes in AlertCloseButton

This commit is contained in:
InsanusMokrassar 2022-02-09 15:28:47 +06:00
parent dcc8646f18
commit 1a655810bd
3 changed files with 10 additions and 3 deletions

View File

@ -37,8 +37,9 @@ fun AlertCloseButton(
A(
null,
{
include(UIKitAlert.Close)
include(UIKitAlert.Close, UIKitIcon)
attr("uk-close", "")
classes("uk-close")
attrs.builder(this)
},
content

View File

@ -211,8 +211,7 @@ sealed class Icon(val name: String) {
onClick: ((Event) -> Unit)? = null
) {
val configurer: AttrBuilderContext<out HTMLElement> = {
classes("uk-icon")
include(*modifiers, type)
include(*modifiers, type, UIKitIcon)
attr("uk-icon", "icon: $name${if (ratio != null) { "; ratio: $ratio" } else ""}")
onClick ?.let { _ ->
onClick { onClick(it.nativeEvent) }

View File

@ -0,0 +1,7 @@
package dev.inmo.jsuikit.modifiers
sealed class UIKitIcon(classname: String) : UIKitModifier {
override val classes: Array<String> = arrayOf(classname)
companion object : UIKitIcon("uk-icon")
}