mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-11-26 20:18:49 +00:00
add support of link icons type
This commit is contained in:
parent
e46b2e0ddd
commit
40c3c0f437
@ -2,6 +2,8 @@
|
||||
|
||||
## 0.0.15
|
||||
|
||||
* Add support of link icons
|
||||
|
||||
## 0.0.14
|
||||
|
||||
* Add DefaultTable parameter cellCustomizer
|
||||
|
@ -219,10 +219,10 @@ sealed class Icon(val name: String) {
|
||||
}
|
||||
attributesCustomizer()
|
||||
}
|
||||
if (type == UIKitIconType.Button) {
|
||||
Button(configurer)
|
||||
} else {
|
||||
Span(configurer)
|
||||
when (type) {
|
||||
UIKitIconType.Default -> Span(configurer)
|
||||
UIKitIconType.Link -> A(href = "#", configurer)
|
||||
UIKitIconType.Button -> Button(configurer)
|
||||
}
|
||||
}
|
||||
|
||||
@ -243,4 +243,12 @@ sealed class Icon(val name: String) {
|
||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||
onClick: ((Event) -> Unit)? = null
|
||||
) = invoke(*modifiers, type = UIKitIconType.Default, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||
|
||||
@Composable
|
||||
fun drawAsLink(
|
||||
vararg modifiers: UIKitModifier,
|
||||
ratio: Float? = null,
|
||||
attributesCustomizer: AttrBuilderContext<out HTMLElement> = {},
|
||||
onClick: ((Event) -> Unit)? = null
|
||||
) = invoke(*modifiers, type = UIKitIconType.Link, ratio = ratio, onClick = onClick, attributesCustomizer = attributesCustomizer)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user