mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2025-12-05 22:05:47 +00:00
now project is multiplatform and correctly working
This commit is contained in:
48
src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt
Normal file
48
src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt
Normal file
@@ -0,0 +1,48 @@
|
||||
package dev.inmo.jsuikit.elements
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import dev.inmo.jsuikit.buildAndAddAttribute
|
||||
import dev.inmo.jsuikit.modifiers.*
|
||||
import dev.inmo.jsuikit.utils.Milliseconds
|
||||
import org.jetbrains.compose.web.dom.*
|
||||
import org.w3c.dom.HTMLDivElement
|
||||
|
||||
@Composable
|
||||
fun Dropdown(
|
||||
vararg modifiers: UIKitModifier,
|
||||
toggle: String? = null,
|
||||
pos: UIKitDropdown.Position? = null,
|
||||
mode: UIKitDropdown.Mode? = null,
|
||||
delayShow: Milliseconds? = null,
|
||||
delayHide: Milliseconds? = null,
|
||||
boundary: String? = null,
|
||||
boundaryAlign: Boolean? = null,
|
||||
flip: UIKitDropdown.Flip? = null,
|
||||
offset: Int? = null,
|
||||
animation: UIKitAnimation? = null,
|
||||
duration: Milliseconds? = null,
|
||||
attributesCustomizer: AttrBuilderContext<HTMLDivElement> = {},
|
||||
contentBuilder: ContentBuilder<HTMLDivElement>
|
||||
) {
|
||||
Div(
|
||||
{
|
||||
buildAndAddAttribute("uk-dropdown") {
|
||||
"toggle" to toggle
|
||||
"pos" to pos
|
||||
"mode" to mode
|
||||
"delayShow" to delayShow
|
||||
"delayHide" to delayHide
|
||||
"boundary" to boundary
|
||||
"boundaryAlign" to boundaryAlign
|
||||
"flip" to flip
|
||||
"offset" to offset
|
||||
"animation" to animation
|
||||
"duration" to duration
|
||||
}
|
||||
classes("uk-dropdown")
|
||||
include(*modifiers)
|
||||
attributesCustomizer()
|
||||
},
|
||||
contentBuilder
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user