mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-12-22 08:37:24 +00:00
fixes for build
This commit is contained in:
parent
17ae0b119b
commit
0c281aa653
@ -202,8 +202,13 @@ sealed class Icon(val name: String) {
|
|||||||
object Youtube : Brands("youtube")
|
object Youtube : Brands("youtube")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Custom(name: String) : Icon(name)
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
}
|
||||||
|
}
|
||||||
@Composable
|
@Composable
|
||||||
operator fun invoke(
|
operator fun Icon.invoke(
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
type: UIKitIconType = UIKitIconType.Default,
|
type: UIKitIconType = UIKitIconType.Default,
|
||||||
ratio: Float? = null,
|
ratio: Float? = null,
|
||||||
@ -225,10 +230,8 @@ sealed class Icon(val name: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Custom(name: String) : Icon(name)
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun drawAsButton(
|
fun Icon.drawAsButton(
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
ratio: Float? = null,
|
ratio: Float? = null,
|
||||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||||
@ -236,7 +239,7 @@ sealed class Icon(val name: String) {
|
|||||||
) = invoke(*modifiers, type = UIKitIconType.Button, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
) = invoke(*modifiers, type = UIKitIconType.Button, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun drawAsIcon(
|
fun Icon.drawAsIcon(
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
ratio: Float? = null,
|
ratio: Float? = null,
|
||||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||||
@ -244,7 +247,7 @@ sealed class Icon(val name: String) {
|
|||||||
) = invoke(*modifiers, type = UIKitIconType.Default, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
) = invoke(*modifiers, type = UIKitIconType.Default, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun drawAsLink(
|
fun Icon.drawAsLink(
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
ratio: Float? = null,
|
ratio: Float? = null,
|
||||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||||
@ -252,10 +255,9 @@ sealed class Icon(val name: String) {
|
|||||||
) = invoke(*modifiers, type = UIKitIconType.Link, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
) = invoke(*modifiers, type = UIKitIconType.Link, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun drawAsFormInputPart(
|
fun Icon.drawAsFormInputPart(
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
ratio: Float? = null,
|
ratio: Float? = null,
|
||||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||||
onClick: ((Event) -> Unit)? = null
|
onClick: ((Event) -> Unit)? = null
|
||||||
) = invoke(*modifiers, UIKitForm.Icon, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
) = invoke(*modifiers, UIKitForm.Icon, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||||
}
|
|
||||||
|
@ -9,7 +9,7 @@ import org.jetbrains.compose.web.dom.Input
|
|||||||
import org.w3c.dom.HTMLInputElement
|
import org.w3c.dom.HTMLInputElement
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun <T> StandardInput(
|
fun <T> DefaultInput(
|
||||||
type: InputType<T>,
|
type: InputType<T>,
|
||||||
value: T,
|
value: T,
|
||||||
disabled: Boolean = false,
|
disabled: Boolean = false,
|
||||||
@ -49,7 +49,7 @@ fun <T> StandardInput(
|
|||||||
placeholder: String? = null,
|
placeholder: String? = null,
|
||||||
vararg modifiers: UIKitModifier,
|
vararg modifiers: UIKitModifier,
|
||||||
attributesCustomizer: AttrBuilderContext<HTMLInputElement> = {},
|
attributesCustomizer: AttrBuilderContext<HTMLInputElement> = {},
|
||||||
) = StandardInput(
|
) = DefaultInput(
|
||||||
type,
|
type,
|
||||||
state.value,
|
state.value,
|
||||||
disabledState ?.value == true,
|
disabledState ?.value == true,
|
||||||
|
Loading…
Reference in New Issue
Block a user