Skip to content

Commit

Permalink
Merge pull request #1866 from ever-co/bug/card-dropdown-and-ios-code-…
Browse files Browse the repository at this point in the history
…field-vertical-align

fixed code filed for iOS devices, and reduced card options dropdown h…
  • Loading branch information
evereq authored Nov 24, 2023
2 parents 1b3360d + a229b90 commit 3d744c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions apps/mobile/app/components/CodeField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react-native/no-inline-styles */
/* eslint-disable react-native/no-color-literals */
import React, { FC, useEffect, useState } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { View, StyleSheet, Text, Dimensions, PixelRatio, Platform } from 'react-native';
import { colors, typography, useAppTheme } from '../theme';
import { CodeField, Cursor, useBlurOnFulfill, useClearByFocusCell } from 'react-native-confirmation-code-field';

Expand All @@ -12,6 +12,9 @@ interface ICodeField {
defaultValue?: string;
}

const { height: screeHeight } = Dimensions.get('screen');
const screenDimension = PixelRatio.get();

export const CodeInputField: FC<ICodeField> = (props) => {
const { onChange, editable, length = 6 } = props;
const { colors } = useAppTheme();
Expand Down Expand Up @@ -54,7 +57,8 @@ export const CodeInputField: FC<ICodeField> = (props) => {
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
lineHeight: 52
lineHeight:
Platform.OS === 'ios' ? screeHeight * 0.055 * (screenDimension / 3) : undefined
}
]}
onLayout={getCellOnLayoutHandler(index)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const ListCardItem: React.FC<Props> = observer((props) => {
...(props.index !== props.openMenuIndex ? { display: 'none' } : {})
}}
>
<View style={{ marginVertical: 10 }}>
<View style={{ marginVertical: 8 }}>
{(memberInfo.isAuthTeamManager || memberInfo.isAuthUser) && taskEdition.task && (
<ListItem
textStyle={[styles.dropdownTxt, { color: colors.primary }]}
Expand Down Expand Up @@ -348,7 +348,7 @@ const styles = StyleSheet.create({
color: '#282048',
fontFamily: typography.primary.semiBold,
fontSize: 14,
height: 38,
height: 36,
width: '100%'
},
estimate: {
Expand Down

0 comments on commit 3d744c1

Please sign in to comment.