Skip to content

Commit 44a9748

Browse files
committed
fix(react-native): prevent leaked closeButtonProps.onPress from overriding onClose by ordering spread before explicit onPress in BannerBase
1 parent cf20ce4 commit 44a9748

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/design-system-react-native/src/components/BannerBase

packages/design-system-react-native/src/components/BannerBase/BannerBase.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ export const BannerBase: React.FC<BannerBaseProps> = ({
120120
iconName={IconName.Close}
121121
size={ButtonIconSize.Sm}
122122
accessibilityLabel={closeButtonAccessibilityLabel}
123-
onPress={onClose}
124123
{...resolvedCloseButtonProps}
124+
onPress={onClose}
125125
/>
126126
)}
127127
</Box>

0 commit comments

Comments
 (0)