Skip to content

Commit

Permalink
Add More docs, fix detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
tonykolomeytsev committed Jul 7, 2023
1 parent 7e92fae commit ac0465c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ internal class NavigationBarScreenNavTarget : NavTarget {
node(buildContext) { NavigationBarScreen() }
}

@Suppress("LongMethod", "MegicNumber")
@Composable
private fun NavigationBarScreen() {
UiKitScreen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ internal class MainScreenNavTarget(private val greetings: String = "MpeiX UI-Kit
node(buildContext) { MainScreen(greetings) }
}

@Suppress("LongMethod")
@Composable
private fun MainScreen(greetings: String) {
val navigator = LocalBackStackNavigator.current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ import androidx.compose.material3.NavigationBarItem as Material3NavigationBarIte
* destination. See [Material3NavigationBarItem] for configuration specific to each item, and not the overall
* [NavigationBar] component.
*
* Usage:
* ```kotlin
* NavigationBar(
* modifier = Modifier.fillMaxWidth(),
* ) {
* NavigationBarItem(
* selected = selectedItemIdx == 0,
* onClick = { selectedItemIdx = 0 },
* icon = {
* Icon(
* painterSelected = MpeixIcons.WhatshotBlack24,
* painterUnselected = MpeixIcons.WhatshotOutline24,
* )
* },
* label = "Dashboard",
* )
* // more items ...
* }
* ```
*
* @param modifier the [Modifier] to be applied to this navigation bar
* @param windowInsets a window insets of the navigation bar.
* @param content the content of this navigation bar, typically 3-5 [Material3NavigationBarItem]s
Expand Down

0 comments on commit ac0465c

Please sign in to comment.