add UIKitComment, Comment element, upfill UIKitSubNav

This commit is contained in:
2022-01-28 14:01:06 +06:00
parent 7edea7bf74
commit 029a7804ad
7 changed files with 167 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
package dev.inmo.jsuikit.utils
fun <T> Array<T>.anyNotNull(): Boolean {
for (item in this) {
if (item != null) {
return true
}
}
return false
}

View File

@@ -0,0 +1,16 @@
package dev.inmo.jsuikit.utils
import androidx.compose.runtime.Composable
import org.jetbrains.compose.web.dom.ContentBuilder
import org.w3c.dom.Element
@Composable
inline fun <T : Element> optionallyDraw (
attrs: Attrs<T>? = null,
noinline contentBuilder: ContentBuilder<T>? = null,
whatToDraw: @Composable () -> Unit
) {
if (attrs != null || contentBuilder != null) {
whatToDraw()
}
}