Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { type StyleProp, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native';
import { Platform, type StyleProp, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native';

import { isAndroid, isTablet } from '../../../../lib/methods/helpers/deviceInfo';
import { isAndroid, isIOS, isTablet } from '../../../../lib/methods/helpers/deviceInfo';

interface IHeaderButtonContainer {
children?: React.ReactElement | (React.ReactElement | null)[] | null;
Expand All @@ -10,18 +10,30 @@ interface IHeaderButtonContainer {
style?: StyleProp<ViewStyle>;
}

const getMargin = () => {
if (isTablet) {
return 5;
}
if (isIOS && Number(Platform.Version) > 26) {
return 0;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
return -5;
};

const margin = getMargin();

const styles = StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
left: {
marginLeft: isTablet ? 5 : -5,
marginLeft: margin,
marginRight: isAndroid ? 5 : 0
},
right: {
marginRight: isTablet ? 5 : -5
marginRight: margin
}
});

Expand Down
Loading