improvements

This commit is contained in:
InsanusMokrassar 2023-06-19 16:42:41 +06:00
parent c0ce6f5b71
commit d2ba2fe96a
4 changed files with 14 additions and 2 deletions

View File

@ -2,6 +2,9 @@
## 0.7.1
* Type of `animation` parameter in `Alert` has been changed according to docs: now it is `Boolean`
* Add tooltip `JS` part support
## 0.7.0
* `Kotlin`: `1.8.20`

View File

@ -12,7 +12,7 @@ import org.w3c.dom.HTMLDivElement
@Composable
fun Alert(
attrs: Attrs<HTMLDivElement> = Attrs.empty(),
animation: UIKitAnimation? = UIKitAnimation.Fade,
animation: Boolean = true,
duration: Milliseconds? = null,
selClose: String? = null,
content: ContentBuilder<HTMLDivElement>
@ -22,7 +22,7 @@ fun Alert(
include(UIKitAlert)
buildAndAddAttribute("uk-alert") {
"animation" to animation ?.classes ?.firstOrNull()
"animation" to animation
"duration" to duration
"sel-close" to selClose
}

View File

@ -17,4 +17,7 @@ external interface UIKit {
fun dropdown(element: Element, options: DropdownOptions = definedExternally): Dropdown
fun dropdown(selector: String, options: DropdownOptions = definedExternally): Dropdown?
fun tooltip(element: Element): UIKitTooltip
fun tooltip(selector: String): UIKitTooltip?
}

View File

@ -0,0 +1,6 @@
package dev.inmo.jsuikit.types
external interface UIKitTooltip {
fun show()
fun hide()
}