Merge pull request #53 from InsanusMokrassar/0.0.52

0.0.52
This commit is contained in:
InsanusMokrassar 2022-04-26 15:09:19 +06:00 committed by GitHub
commit 7cdd12e81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 0.0.52
* Improve work with UIKitModifiers
## 0.0.51 ## 0.0.51
* New interface `Dropdown` which will be used to create (or retrieve) dropdown for an element * New interface `Dropdown` which will be used to create (or retrieve) dropdown for an element

View File

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

View File

@ -26,8 +26,8 @@ operator fun UIKitModifier.plus(other: UIKitModifier): UIKitModifier = UIKitCust
classes + other.classes, classes + other.classes,
otherAttrs + other.otherAttrs otherAttrs + other.otherAttrs
) )
fun <T: Element> UIKitModifier.builder() = Attrs<T>(this).builder fun <T: Element> UIKitModifier?.builder() = Attrs<T>(this).builder
fun <T: Element> Array<out UIKitModifier>.builder() = Attrs<T>(*this).builder fun <T: Element> Array<out UIKitModifier?>.builder() = Attrs<T>(*this).builder
inline fun <T: Element> attrsBuilder(vararg modifiers: UIKitModifier) = modifiers.builder<T>() inline fun <T: Element> attrsBuilder(vararg modifiers: UIKitModifier?) = modifiers.builder<T>()
@JsName("plusBuilder") @JsName("plusBuilder")
operator fun <T: Element> UIKitModifier.plus(other: UIKitModifier): AttrBuilderContext<T> = Attrs<T>(this@plus, other).builder operator fun <T: Element> UIKitModifier?.plus(other: UIKitModifier?): AttrBuilderContext<T> = Attrs<T>(this@plus, other).builder