diff --git a/CHANGELOG.md b/CHANGELOG.md index be2f8e9..d2ee0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.0.49 + +* Now it is possible to use optional title in navs builders + ## 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 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(),