mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-02 15:00:09 +00:00
Compare commits
No commits in common. "589fc62364f848252b3335196ec220bcdbce299e" and "e5223f84084c77ec5fd3ce86611c6d17d983d613" have entirely different histories.
589fc62364
...
e5223f8408
@ -1,9 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 0.1.7
|
|
||||||
|
|
||||||
Add Toggle builder
|
|
||||||
|
|
||||||
## 0.1.6
|
## 0.1.6
|
||||||
|
|
||||||
* Add support of UIKitButton size and group
|
* Add support of UIKitButton size and group
|
||||||
|
@ -9,4 +9,4 @@ android.enableJetifier=true
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.1.7
|
version=0.1.6
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
package dev.inmo.jsuikit.elements
|
|
||||||
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import dev.inmo.jsuikit.modifiers.UIKitToggle
|
|
||||||
import dev.inmo.jsuikit.modifiers.include
|
|
||||||
import dev.inmo.jsuikit.utils.Attrs
|
|
||||||
import org.jetbrains.compose.web.attributes.ButtonType
|
|
||||||
import org.jetbrains.compose.web.attributes.type
|
|
||||||
import org.jetbrains.compose.web.dom.Button
|
|
||||||
import org.jetbrains.compose.web.dom.ContentBuilder
|
|
||||||
import org.w3c.dom.HTMLButtonElement
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun Toggle(
|
|
||||||
attrs: Attrs<HTMLButtonElement>,
|
|
||||||
contentBuilder: ContentBuilder<HTMLButtonElement>
|
|
||||||
) {
|
|
||||||
Button(
|
|
||||||
{
|
|
||||||
include(UIKitToggle)
|
|
||||||
type(ButtonType.Button)
|
|
||||||
attrs.builder(this)
|
|
||||||
},
|
|
||||||
contentBuilder
|
|
||||||
)
|
|
||||||
}
|
|
@ -38,7 +38,7 @@ sealed class UIKitToggle(
|
|||||||
|
|
||||||
class Custom internal constructor(otherAttrs: Map<String, String>) : UIKitToggle(otherAttrs = otherAttrs)
|
class Custom internal constructor(otherAttrs: Map<String, String>) : UIKitToggle(otherAttrs = otherAttrs)
|
||||||
|
|
||||||
companion object : UIKitToggle(otherAttrs = mapOf("uk-toggle" to "")) {
|
companion object {
|
||||||
operator fun invoke(
|
operator fun invoke(
|
||||||
target: String? = null,
|
target: String? = null,
|
||||||
mode: Mode? = null,
|
mode: Mode? = null,
|
||||||
|
Loading…
Reference in New Issue
Block a user