Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yangm97/d629025e0a40254f94bfffed22a55dc3 to your computer and use it in GitHub Desktop.
Save yangm97/d629025e0a40254f94bfffed22a55dc3 to your computer and use it in GitHub Desktop.
Workaround for react-navigation-header-buttons with @react-navigation/native-stack
diff --git a/node_modules/react-navigation-header-buttons/src/HeaderItems.js b/node_modules/react-navigation-header-buttons/src/HeaderItems.js
index 36ef1d4..a0be0ee 100644
--- a/node_modules/react-navigation-header-buttons/src/HeaderItems.js
+++ b/node_modules/react-navigation-header-buttons/src/HeaderItems.js
@@ -55,21 +55,25 @@ export function renderVisibleButton(visibleButtonProps: VisibleButtonProps): Rea
const styles = StyleSheet.create({
text: {
+ fontSize: 17,
+ textTransform: 'capitalize',
...Platform.select({
android: {
fontFamily: 'sans-serif-medium',
fontSize: 14,
- marginHorizontal: 11,
textTransform: 'uppercase',
},
+ ios: {},
default: {
- fontSize: 17,
marginHorizontal: 10,
- textTransform: 'capitalize',
},
}),
},
- button: {
- marginHorizontal: 11,
- },
+ button: Platform.select({
+ ios: {},
+ android: {},
+ default: {
+ marginHorizontal: 11,
+ },
+ }),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment