Skip to main content

Navigation

Defaults​

All One App's modules will now get a default navigation style from UILib.
All screens that are opened using Navigation.push() or Navigation.showModal() will get the default One-App style.

See Navigation Style guidelines here.

Overrides​

Three ways to override our navigation style

  • Using Navigation.mergeOptions()
  • Passing options when using push/showModal (will be possible after this resolved)
  • Setting the static options in your component's class. (will be possible after this resolved)

We also added some methods to provide different navigation styles and behaviors

getTransparentNavigationStyle​

Use to achieve transparent navbar, use it with ‘light’ or ‘dark’ themes.
usage: Navigation.mergeOptions(this.props.componentId, NavigationStyle.getTransparentNavigationStyle(theme))

getRightButtonLoader​

Use in your rightButtons array when setting navigation buttons to get a loader.
usage: NavigationStyle.getRightButtonLoader(this.props.businessId)

getBadgedButton​

Custom BadgedButton (Button with a Badge) component to use in your Navigation topBar rightButtons array. Send the BadgedButton props as arguements.
usage: NavigationStyle.getBadgedButton({themeId, buttonProps, badgeProps})