From 4a7b125abe9f2bf548278f545edd836067cd156a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 3 Apr 2022 16:02:55 +0600 Subject: [PATCH 1/2] start 0.0.49 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be2f8e9..9880e15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.0.49 + ## 0.0.48 * Added support of `Breadcrumb` diff --git a/gradle.properties b/gradle.properties index 5d89877..8d0ae16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,4 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.0.48 +version=0.0.49 From ee1bea8ee15840e7aa0974ffe1b176cf445f6abd Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 3 Apr 2022 16:03:13 +0600 Subject: [PATCH 2/2] in navs now titles are optional --- CHANGELOG.md | 2 ++ .../kotlin/dev/inmo/jsuikit/elements/Nav.kt | 20 ++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9880e15..d2ee0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.0.49 +* Now it is possible to use optional title in navs builders + ## 0.0.48 * Added support of `Breadcrumb` diff --git a/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Nav.kt b/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Nav.kt index 518c99c..5ab17c7 100644 --- a/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Nav.kt +++ b/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Nav.kt @@ -94,7 +94,7 @@ fun SubNav( @Composable fun Nav( - title: String, + title: String?, data: Iterable, vararg ulModifiers: UIKitModifier, titleModifiers: Array = emptyArray(), @@ -119,11 +119,13 @@ fun Nav( ulCustomizer() } ) { - NavHeader( - title, - *titleModifiers, - attributesCustomizer = titleCustomizer - ) + title ?.let { + NavHeader( + title, + *titleModifiers, + attributesCustomizer = titleCustomizer + ) + } besidesTitleAndList ?.let { it() } data.forEach { elementAllocator(it) @@ -133,7 +135,7 @@ fun Nav( @Composable fun DefaultNav( - title: String, + title: String?, data: Iterable, vararg ulModifiers: UIKitModifier, titleModifiers: Array = emptyArray(), @@ -162,7 +164,7 @@ fun DefaultNav( @Composable fun PrimaryNav( - title: String, + title: String?, data: Iterable, vararg ulModifiers: UIKitModifier, titleModifiers: Array = emptyArray(), @@ -191,7 +193,7 @@ fun PrimaryNav( @Composable fun SubNav( - title: String, + title: String?, data: Iterable, vararg ulModifiers: UIKitModifier, titleModifiers: Array = emptyArray(),