react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

feat: add iconBackground support to backButton on iOS and Android

Open adids1221 opened this issue 1 month ago • 1 comments

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; to OptionsTopBarBackButton TypeScript interface
  • Android: Parse and merge iconBackground in BackButton class, apply via ButtonPresenter.applyNavigationIcon()
  • iOS: Add iconBackground property to RNNBackButtonOptions, parse and merge, render using RNNIconDrawer

Technical Details:

  • Android: Reuses existing IconBackgroundDrawable infrastructure via applyIconBackgroundDrawable() method
  • iOS: Uses RNNIconDrawer directly (simpler approach, no need for full icon creator system)
  • Both platforms support: color, disabledColor, cornerRadius, width, height properties

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

adids1221 avatar Dec 01 '25 09:12 adids1221

@markdevocht, should I merge master already? Or wait for the Shai Hulud fix?

adids1221 avatar Dec 07 '25 15:12 adids1221