react-native-navigation
react-native-navigation copied to clipboard
feat: add iconBackground support to backButton on iOS and Android
Description
Adds iconBackground property support to backButton options, matching the functionality available for rightButtons and leftButtons.
This enables circular and rounded background shapes behind the back button icon, consistent with regular button styling.
Changes:
- Added
iconBackground?: IconBackgroundOptions;toOptionsTopBarBackButtonTypeScript interface - Android: Parse and merge
iconBackgroundinBackButtonclass, apply viaButtonPresenter.applyNavigationIcon() - iOS: Add
iconBackgroundproperty toRNNBackButtonOptions, parse and merge, render usingRNNIconDrawer
Technical Details:
- Android: Reuses existing
IconBackgroundDrawableinfrastructure viaapplyIconBackgroundDrawable()method - iOS: Uses
RNNIconDrawerdirectly (simpler approach, no need for full icon creator system) - Both platforms support:
color,disabledColor,cornerRadius,width,heightproperties
Changelog
BackButton - Added iconBackground property support. Back button icons can now display circular or rounded backgrounds matching the styling of regular navigation buttons.
Additional info
MADS-4884
@markdevocht, should I merge master already? Or wait for the Shai Hulud fix?