Merge pull request #15 from InsanusMokrassar/0.0.15

0.0.15
This commit is contained in:
InsanusMokrassar 2022-01-21 22:41:49 +06:00 committed by GitHub
commit 66c3f97f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 0.0.15
* Add support of link icons
## 0.0.14
* Add DefaultTable parameter cellCustomizer

View File

@ -9,4 +9,4 @@ android.enableJetifier=true
# Project data
group=dev.inmo
version=0.0.14
version=0.0.15

View File

@ -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)
}