@fadyshawky/react-native-magic 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "reactnativemagic",
2
+ "name": "@fadyshawky/react-native-magic",
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "scripts": {
@@ -13,10 +13,12 @@
13
13
  "ios": "react-native run-ios",
14
14
  "lint": "eslint .",
15
15
  "start": "react-native start",
16
+ "start:development": "ENVFILE=.env.development react-native start --reset-cache",
17
+ "start:production": "ENVFILE=.env.production react-native start --reset-cache",
18
+ "start:staging": "ENVFILE=.env.staging react-native start --reset-cache",
16
19
  "test": "jest"
17
20
  },
18
21
  "dependencies": {
19
- "@gorhom/bottom-sheet": "^5.0.6",
20
22
  "@react-native-async-storage/async-storage": "^2.1.0",
21
23
  "@react-native-camera-roll/camera-roll": "^7.9.0",
22
24
  "@react-native-community/datetimepicker": "^8.2.0",
@@ -35,39 +37,20 @@
35
37
  "@types/lodash": "^4.17.13",
36
38
  "@types/react-native-vector-icons": "^6.4.18",
37
39
  "@types/react-redux": "^7.1.34",
38
- "@typescript-eslint/eslint-plugin": "^8.18.1",
39
- "@typescript-eslint/parser": "^8.18.1",
40
40
  "axios": "^1.7.9",
41
41
  "babel-plugin-transform-remove-console": "^6.9.4",
42
42
  "dayjs": "^1.11.13",
43
43
  "detox": "^20.28.0",
44
- "eslint-config-react-strong": "^2.4.0",
45
- "eslint-import-resolver-typescript": "^3.7.0",
46
- "eslint-plugin-import": "^2.31.0",
47
- "eslint-plugin-jest": "^28.10.0",
48
- "eslint-plugin-react": "^7.37.2",
49
- "eslint-plugin-react-hooks": "^5.1.0",
50
- "eslint-plugin-react-native": "^4.1.0",
51
- "eslint-plugin-unused-imports": "^4.1.4",
52
- "husky": "^9.1.7",
53
44
  "intl": "^1.2.5",
54
- "lint-staged": "^15.2.11",
55
45
  "lodash": "^4.17.21",
56
- "metro-react-native-babel-preset": "^0.77.0",
57
46
  "mime": "^4.0.6",
58
- "moment": "^2.30.1",
59
47
  "patch-package": "^8.0.0",
60
48
  "react": "^18.3.1",
61
- "react-dom": "^19.0.0",
62
49
  "react-native": "^0.76.5",
63
50
  "react-native-actions-sheet": "^0.9.7",
64
51
  "react-native-animated-pagination-dots": "^0.1.73",
65
- "react-native-bundle-visualizer": "^3.1.3",
66
52
  "react-native-calendars": "^1.1307.0",
67
- "react-native-camera": "^4.2.1",
68
53
  "react-native-config": "^1.5.3",
69
- "react-native-config-node": "^0.0.3",
70
- "react-native-dev-menu": "^4.1.1",
71
54
  "react-native-device-info": "^14.0.2",
72
55
  "react-native-dropdown-select-list": "^2.0.5",
73
56
  "react-native-gesture-handler": "^2.21.2",
@@ -77,6 +60,7 @@
77
60
  "react-native-keyboard-aware-scroll-view": "^0.9.5",
78
61
  "react-native-localization": "^2.3.2",
79
62
  "react-native-mask-input": "^1.2.3",
63
+ "react-native-orientation-locker": "^1.7.0",
80
64
  "react-native-pager-view": "^6.6.1",
81
65
  "react-native-permissions": "^5.2.1",
82
66
  "react-native-reanimated": "^3.16.6",
@@ -85,24 +69,22 @@
85
69
  "react-native-screens": "^4.4.0",
86
70
  "react-native-sfsymbols": "^1.2.2",
87
71
  "react-native-share": "^12.0.3",
88
- "react-native-size-matters": "^0.4.2",
89
72
  "react-native-snackbar": "^2.8.0",
90
73
  "react-native-svg": "^15.10.1",
91
74
  "react-native-tab-view": "^4.0.5",
92
75
  "react-native-vector-icons": "^10.2.0",
93
- "react-native-version": "^4.0.0",
94
76
  "react-native-vision-camera": "^4.6.3",
95
77
  "react-native-webview": "^13.12.5",
96
78
  "react-redux": "^9.2.0",
97
79
  "redux": "^5.0.1",
98
80
  "redux-persist": "^6.0.0",
99
- "redux-persist-transform-filter": "^0.0.22",
100
- "rn-fetch-blob": "^0.12.0"
81
+ "redux-persist-transform-filter": "^0.0.22"
101
82
  },
102
83
  "devDependencies": {
103
84
  "@babel/core": "^7.25.2",
104
85
  "@babel/preset-env": "^7.26.0",
105
86
  "@babel/runtime": "^7.26.0",
87
+ "@jest/globals": "^29.7.0",
106
88
  "@react-native-community/cli": "15.0.1",
107
89
  "@react-native-community/cli-platform-android": "15.0.1",
108
90
  "@react-native-community/cli-platform-ios": "15.0.1",
@@ -114,6 +96,12 @@
114
96
  "@types/react-test-renderer": "^18.3.1",
115
97
  "babel-jest": "^29.7.0",
116
98
  "eslint": "^8.57.1",
99
+ "eslint-plugin-import": "^2.31.0",
100
+ "eslint-plugin-jest": "^28.10.0",
101
+ "eslint-plugin-react": "^7.37.2",
102
+ "eslint-plugin-react-hooks": "^5.1.0",
103
+ "eslint-plugin-react-native": "^4.1.0",
104
+ "eslint-plugin-unused-imports": "^4.1.4",
117
105
  "jest": "^29.7.0",
118
106
  "prettier": "^2.8.8",
119
107
  "react-test-renderer": "^18.3.1",
@@ -8,11 +8,9 @@ import {
8
8
  TouchableOpacity,
9
9
  ViewStyle,
10
10
  } from 'react-native';
11
- import {ImageResources} from '../ImageResources.g';
12
11
  import {Image as CropperImage} from 'react-native-image-crop-picker';
12
+ import {Colors} from '../../core/theme/colors';
13
13
  import {CommonSizes} from '../../core/theme/commonSizes';
14
- import {Colors, PlatformColorsIOS} from '../../core/theme/colors';
15
- import {platformMixedColor} from '../helpers/colorHelpers';
16
14
 
17
15
  interface IProps {
18
16
  onPress?: () => void;
@@ -26,7 +24,7 @@ interface IProps {
26
24
 
27
25
  export const PhotoTakingButton: FC<IProps> = memo(
28
26
  ({
29
- icon = ImageResources.camera,
27
+ icon,
30
28
  onPress,
31
29
  backgroundImage,
32
30
  style,
@@ -36,7 +34,7 @@ export const PhotoTakingButton: FC<IProps> = memo(
36
34
  }) => {
37
35
  return (
38
36
  <TouchableOpacity
39
- style={[styles.button, style] as ViewStyle}
37
+ style={[styles.button, style]}
40
38
  onPress={onPress}
41
39
  disabled={disabled}>
42
40
  <BackgroundComponent image={backgroundImage} style={imageStyle}>
@@ -78,7 +76,7 @@ const styles = StyleSheet.create({
78
76
  justifyContent: 'center',
79
77
  borderRadius: CommonSizes.borderRadius.small,
80
78
  borderWidth: 1,
81
- borderColor: platformMixedColor(PlatformColorsIOS.systemFill, Colors.gray),
79
+ borderColor: Colors.gray,
82
80
  } as ViewStyle,
83
81
  image: {
84
82
  height: 120,
@@ -93,7 +91,7 @@ const styles = StyleSheet.create({
93
91
  width: 32,
94
92
  height: 32,
95
93
  resizeMode: 'contain',
96
- tintColor: platformMixedColor(PlatformColorsIOS.label, Colors.black),
94
+ tintColor: Colors.black,
97
95
  opacity: 0.8,
98
96
  } as ImageStyle,
99
97
  });
@@ -21,15 +21,10 @@ import {
21
21
  View,
22
22
  ViewStyle,
23
23
  } from 'react-native';
24
- import {
25
- Colors,
26
- PlatformColorsAndroid,
27
- PlatformColorsIOS,
28
- } from '../../core/theme/colors';
24
+ import {Colors} from '../../core/theme/colors';
29
25
  import {isIos} from '../../core/theme/commonConsts';
30
26
  import {CommonSizes} from '../../core/theme/commonSizes';
31
27
  import {CommonStyles} from '../../core/theme/commonStyles';
32
- import {platformMixedColor, platformNativeColor} from '../helpers/colorHelpers';
33
28
  import {localization} from '../localization/localization';
34
29
 
35
30
  interface IProps extends TextInputProps {
@@ -65,10 +60,7 @@ export const PrimaryTextInput: FC<IProps> = memo(
65
60
  disableFullscreenUI = true,
66
61
  enablesReturnKeyAutomatically = true,
67
62
  underlineColorAndroid = Colors.transparent,
68
- placeholderTextColor = platformNativeColor(
69
- PlatformColorsIOS.placeholderText,
70
- PlatformColorsAndroid.secondaryText,
71
- ),
63
+ placeholderTextColor = Colors.gray,
72
64
  editable = true,
73
65
  clearButtonMode = 'while-editing',
74
66
  label,
@@ -200,10 +192,7 @@ function getInputContainerStyle(
200
192
  }
201
193
  }
202
194
 
203
- const selectionColor = platformNativeColor(
204
- PlatformColorsIOS.systemBlue,
205
- PlatformColorsAndroid.primary,
206
- );
195
+ const selectionColor = Colors.primary100;
207
196
 
208
197
  const commonInputContainer: TextStyle = {
209
198
  flexDirection: 'row',
@@ -279,7 +268,7 @@ const styles = StyleSheet.create({
279
268
  } as TextStyle,
280
269
  error: {
281
270
  ...CommonStyles.normalText,
282
- color: platformMixedColor(PlatformColorsIOS.systemRed, Colors.red),
271
+ color: Colors.red,
283
272
  fontSize: CommonSizes.font.small,
284
273
  lineHeight: CommonSizes.lineHeight.small,
285
274
  paddingTop: CommonSizes.spacing.extraSmall,
@@ -4,11 +4,7 @@ import {RadioIcon} from './RadioIcon';
4
4
  import {TouchablePlatform} from './TouchablePlatform';
5
5
  import {CommonSizes} from '../../core/theme/commonSizes';
6
6
  import {CommonStyles} from '../../core/theme/commonStyles';
7
- import {
8
- PlatformColorsAndroid,
9
- PlatformColorsIOS,
10
- } from '../../core/theme/colors';
11
- import {platformNativeColor} from '../helpers/colorHelpers';
7
+ import {Colors} from '../../core/theme/colors';
12
8
 
13
9
  interface IIconComponentProps {
14
10
  isSelected: boolean;
@@ -65,9 +61,6 @@ const styles = StyleSheet.create({
65
61
  } as TextStyle,
66
62
  labelDisabled: {
67
63
  ...commonLabel,
68
- color: platformNativeColor(
69
- PlatformColorsIOS.systemFill,
70
- PlatformColorsAndroid.secondaryText,
71
- ),
64
+ color: Colors.gray,
72
65
  } as TextStyle,
73
66
  });
@@ -1,11 +1,6 @@
1
1
  import React, {FC, memo, useMemo} from 'react';
2
2
  import {StyleSheet, View, ViewStyle} from 'react-native';
3
- import {
4
- Colors,
5
- PlatformColorsAndroid,
6
- PlatformColorsIOS,
7
- } from '../../core/theme/colors';
8
- import {platformMixedColor, platformNativeColor} from '../helpers/colorHelpers';
3
+ import {Colors} from '../../core/theme/colors';
9
4
 
10
5
  interface IProps {
11
6
  isSelected: boolean;
@@ -47,17 +42,14 @@ const commonInnerCircle: ViewStyle = {
47
42
  const styles = StyleSheet.create({
48
43
  outerCircle: {
49
44
  ...commonOuterCircle,
50
- borderColor: platformMixedColor(PlatformColorsIOS.systemFill, Colors.black),
45
+ borderColor: Colors.primary100,
51
46
  } as ViewStyle,
52
47
  outerCircleSelected: {
53
48
  ...commonOuterCircle,
54
- borderColor: platformMixedColor(PlatformColorsIOS.systemBlue, Colors.black),
49
+ borderColor: Colors.primary100,
55
50
  } as ViewStyle,
56
51
  innerCircle: {
57
52
  ...commonInnerCircle,
58
- backgroundColor: platformNativeColor(
59
- PlatformColorsIOS.systemBlue,
60
- PlatformColorsAndroid.primary,
61
- ),
53
+ backgroundColor: Colors.primary100,
62
54
  } as ViewStyle,
63
55
  });
@@ -1,12 +1,8 @@
1
1
  import React, {FC, useMemo} from 'react';
2
2
  import {StyleSheet, View, ViewStyle} from 'react-native';
3
- import {
4
- PlatformColorsAndroid,
5
- PlatformColorsIOS,
6
- } from '../../core/theme/colors';
3
+ import {Colors} from '../../core/theme/colors';
7
4
  import {hairlineWidth} from '../../core/theme/commonConsts';
8
5
  import {CommonSizes} from '../../core/theme/commonSizes';
9
- import {platformNativeColor} from '../helpers/colorHelpers';
10
6
 
11
7
  interface IProps {
12
8
  isFull?: boolean;
@@ -22,10 +18,7 @@ export const Separator: FC<IProps> = ({isFull = true}) => {
22
18
 
23
19
  const sharedStyle: ViewStyle = {
24
20
  height: hairlineWidth,
25
- backgroundColor: platformNativeColor(
26
- PlatformColorsIOS.separator,
27
- PlatformColorsAndroid.divider,
28
- ),
21
+ backgroundColor: Colors.gray,
29
22
  };
30
23
 
31
24
  const styles = StyleSheet.create({
@@ -7,9 +7,8 @@ import {
7
7
  PressableStateCallbackType,
8
8
  ViewStyle,
9
9
  } from 'react-native';
10
- import {Colors, PlatformColorsIOS} from '../../core/theme/colors';
10
+ import {Colors} from '../../core/theme/colors';
11
11
  import {isAndroid} from '../../core/theme/commonConsts';
12
- import {platformMixedColor} from '../helpers/colorHelpers';
13
12
 
14
13
  interface IProps extends PressableProps {
15
14
  style?: ViewStyle | ViewStyle[];
@@ -17,15 +16,7 @@ interface IProps extends PressableProps {
17
16
  }
18
17
 
19
18
  export const TouchablePlatform: FC<IProps> = memo(
20
- ({
21
- children,
22
- highlightColor = platformMixedColor(
23
- PlatformColorsIOS.secondarySystemFill,
24
- Colors.white,
25
- ),
26
- style,
27
- ...props
28
- }) => {
19
+ ({children, highlightColor = Colors.white, style, ...props}) => {
29
20
  const pressableStyle = useCallback(
30
21
  (state: PressableStateCallbackType) => {
31
22
  if (isAndroid) {
@@ -6,13 +6,9 @@ import {
6
6
  TouchableOpacity,
7
7
  View,
8
8
  } from 'react-native';
9
- import {
10
- PlatformColorsAndroid,
11
- PlatformColorsIOS,
12
- } from '../../core/theme/colors';
9
+ import {Colors} from '../../core/theme/colors';
13
10
  import {CommonSizes} from '../../core/theme/commonSizes';
14
11
  import {CommonStyles} from '../../core/theme/commonStyles';
15
- import {platformNativeColor} from '../helpers/colorHelpers';
16
12
  import {localization} from '../localization/localization';
17
13
 
18
14
  interface IProps {
@@ -46,10 +42,7 @@ const styles = StyleSheet.create({
46
42
  } as TextStyle,
47
43
  description: {
48
44
  ...CommonStyles.normalText,
49
- color: platformNativeColor(
50
- PlatformColorsIOS.systemBlue,
51
- PlatformColorsAndroid.primary,
52
- ),
45
+ color: Colors.primary100,
53
46
  textAlign: 'center',
54
47
  textDecorationLine: 'underline',
55
48
  } as TextStyle,
@@ -1,7 +1,6 @@
1
- import moment from 'moment';
2
- import {handleFetchJsonResponse} from '../../api/responseHandlers';
3
- import {get, post, put} from '../../api/serverHeaders';
4
1
  import {createAsyncThunk} from '@reduxjs/toolkit';
2
+ import {handleFetchJsonResponse} from '../../api/responseHandlers';
3
+ import {post} from '../../api/serverHeaders';
5
4
 
6
5
  export const userLogin = createAsyncThunk(
7
6
  'user/login',
@@ -43,75 +43,46 @@ export enum Colors {
43
43
  yellow5 = '#FFFDF8',
44
44
  }
45
45
 
46
- export enum PlatformColorsIOS {
47
- /* Label Colors */
48
- label = 'label',
49
- secondaryLabel = 'secondaryLabel',
50
- tertiaryLabel = 'tertiaryLabel',
51
- quaternaryLabel = 'quaternaryLabel',
52
-
53
- /* Fill Colors */
54
- systemFill = 'systemFill',
55
- secondarySystemFill = 'secondarySystemFill',
56
- tertiarySystemFill = 'tertiarySystemFill',
57
- quaternarySystemFill = 'quaternarySystemFill',
58
-
59
- /* Text Colors */
60
- placeholderText = 'placeholderText',
61
-
62
- /* Standard Content Background Colors */
63
- systemBackground = 'systemBackground',
64
- secondarySystemBackground = 'secondarySystemBackground',
65
- tertiarySystemBackground = 'tertiarySystemBackground',
66
-
67
- /* Grouped Content Background Colors */
68
- systemGroupedBackground = 'systemGroupedBackground',
69
- secondarySystemGroupedBackground = 'secondarySystemGroupedBackground',
70
- tertiarySystemGroupedBackground = 'tertiarySystemGroupedBackground',
71
-
72
- /* Separator Colors */
73
- separator = 'separator',
74
- opaqueSeparator = 'opaqueSeparator',
75
-
76
- /* Link Color */
77
- link = 'link',
78
-
79
- /* Nonadaptable Colors */
80
- darkText = 'darkText',
81
- lightText = 'lightText',
82
-
83
- /* Standard Colors */
84
- /* Adaptable Colors */
85
- systemBlue = 'systemBlue',
86
- systemGreen = 'systemGreen',
87
- systemIndigo = 'systemIndigo',
88
- systemOrange = 'systemOrange',
89
- systemPink = 'systemPink',
90
- systemPurple = 'systemPurple',
91
- systemRed = 'systemRed',
92
- systemTeal = 'systemTeal',
93
- systemYellow = 'systemYellow',
94
-
95
- /* Adaptable Gray Colors */
96
- systemGray = 'systemGray',
97
- systemGray2 = 'systemGray2',
98
- systemGray3 = 'systemGray3',
99
- systemGray4 = 'systemGray4',
100
- systemGray5 = 'systemGray5',
101
- systemGray6 = 'systemGray6',
102
- }
103
-
104
- export enum PlatformColorsAndroid {
105
- primary = '@color/primary',
106
- primaryDark = '@color/primaryDark',
107
- primaryLight = '@color/primaryLight',
108
- background = '@color/background',
109
- primaryText = '@color/primaryText',
110
- primaryTextOpacity = '@color/primaryTextOpacity',
111
- secondaryText = '@color/secondaryText',
112
- onPrimaryText = '@color/onPrimaryText',
113
- onPrimaryTextOpacity = '@color/onPrimaryTextOpacity',
114
- divider = '@color/divider',
115
- navigation = '@color/navigation',
116
- statusbar = '@color/statusbar',
46
+ export enum NewColors {
47
+ violetLight = '#F3F2FF',
48
+ violetLightHover = '#E6E6FF',
49
+ violetLightActive = '#C1C0FE',
50
+ violetNormal = '#8481FD',
51
+ violetNormalHover = '#5250D9',
52
+ violetNormalActive = '#3331B8',
53
+ violetDark = '#262626',
54
+ violetDarkHover = '#1A1994',
55
+ violetDarkActive = '#111066',
56
+ violetDarker = '#000033',
57
+ blueLight = '#F6FCFF',
58
+ blueLightHover = '#E9F8FF',
59
+ blueLightActive = '#C1E5FF',
60
+ blueNormal = '#52BDFF',
61
+ blueNormalHover = '#3399D9',
62
+ blueNormalActive = '#1A7DB3',
63
+ blueDarker = '#262626',
64
+ greyLight = '#F9FCFF',
65
+ greyLightHover = '#E0E0E0',
66
+ greyLightActive = '#BDBDBD',
67
+ greyNormal = '#929292',
68
+ greyNormalHover = '#666666',
69
+ greyNormalActive = '#4D4D4D',
70
+ greyDarker = '#262626',
71
+ orandeLight = '#FFFAF8',
72
+ orandeLightHover = '#FDECE1',
73
+ orandeLightActive = '#FBCEB4',
74
+ orandeNormal = '#F2565E',
75
+ orandeNormalHover = '#CE3C3E',
76
+ orandeNormalActive = '#AD3335',
77
+ orandeDarker = '#262626',
78
+ lightBlueLight = '#FEF7F7',
79
+ lightBlueLightHover = '#FCDDDF',
80
+ lightBlueLightActive = '#F9AAAF',
81
+ lightBlueNormal = '#CE3C3E',
82
+ lightBlueNormalHover = '#AD3335',
83
+ lightBlueNormalActive = '#8C292B',
84
+ lightBlueDarker = '#262626',
85
+ red = '#FFFCF1',
86
+ green = '#F4FDFB',
87
+ background = '#FAFAFA',
117
88
  }
@@ -1,12 +1,7 @@
1
1
  export const Fonts = {
2
- system: 'System',
3
- thin: 'KumbhSans-Thin',
4
- light: 'KumbhSans-Light',
5
- extraLight: 'KumbhSans-ExtraLight',
6
- regular: 'KumbhSans-Regular',
7
- medium: 'KumbhSans-Medium',
8
- semiBold: 'KumbhSans-SemiBold',
9
- bold: 'KumbhSans-Bold',
10
- extraBold: 'KumbhSans-ExtraBold',
11
- black: 'KumbhSans-Black',
2
+ light: 'Poppins-Light',
3
+ regular: 'Poppins-Regular',
4
+ medium: 'Poppins-Medium',
5
+ semiBold: 'Poppins-SemiBold',
6
+ bold: 'Poppins-Bold',
12
7
  };
@@ -1,12 +1,14 @@
1
1
  // In App.js in a new project
2
2
 
3
- import {NavigationContainer} from '@react-navigation/native';
3
+ import {DefaultTheme, NavigationContainer} from '@react-navigation/native';
4
4
  import * as React from 'react';
5
5
  import {useRef} from 'react';
6
6
  import {useAppSelector} from '../core/store/reduxHelpers';
7
7
  import {AuthStack} from './AuthStack';
8
8
  import {AppMainNavigator} from './MainStack';
9
9
  import {navigationRef} from './RootNavigation';
10
+ import {NewColors} from '../core/theme/colors';
11
+ import {Fonts} from '../core/theme/fonts';
10
12
 
11
13
  function AppNavigator() {
12
14
  const routeNameRef = useRef<string | undefined>(undefined);
@@ -19,7 +21,7 @@ function AppNavigator() {
19
21
  dark: false,
20
22
  colors: {
21
23
  primary: '#000',
22
- background: 'transparent',
24
+ background: NewColors.background,
23
25
  card: '#fff',
24
26
  text: '#000',
25
27
  border: '#000',
@@ -27,19 +29,19 @@ function AppNavigator() {
27
29
  },
28
30
  fonts: {
29
31
  regular: {
30
- fontFamily: 'System',
32
+ fontFamily: Fonts.regular,
31
33
  fontWeight: 'normal',
32
34
  },
33
35
  medium: {
34
- fontFamily: 'System',
36
+ fontFamily: Fonts.medium,
35
37
  fontWeight: '500',
36
38
  },
37
39
  bold: {
38
- fontFamily: 'System',
40
+ fontFamily: Fonts.bold,
39
41
  fontWeight: '700',
40
42
  },
41
43
  heavy: {
42
- fontFamily: 'System',
44
+ fontFamily: Fonts.bold,
43
45
  fontWeight: '900',
44
46
  },
45
47
  },
@@ -1,7 +0,0 @@
1
- {
2
- "workbench.colorCustomizations": {
3
- "activityBar.background": "#342D0C",
4
- "titleBar.activeBackground": "#493F10",
5
- "titleBar.activeForeground": "#FCFAF0"
6
- }
7
- }
@@ -1,34 +0,0 @@
1
- import {isIos} from '../../core/theme/commonConsts';
2
- import {
3
- Colors,
4
- PlatformColorsAndroid,
5
- PlatformColorsIOS,
6
- } from '../../core/theme/colors';
7
-
8
- export function platformNativeColor(
9
- iosColor?: PlatformColorsIOS,
10
- androidColor?: PlatformColorsAndroid,
11
- ) {
12
- const selectedColor = isIos ? iosColor : androidColor;
13
-
14
- return selectedColor != null ? 'black' : undefined;
15
- }
16
-
17
- export function platformLocalColor(iosColor?: Colors, androidColor?: Colors) {
18
- return isIos ? iosColor : androidColor;
19
- }
20
-
21
- export function platformMixedColor(
22
- iosColor?: Colors | PlatformColorsIOS,
23
- androidColor?: Colors | PlatformColorsAndroid,
24
- ) {
25
- const selectedColor = iosColor;
26
-
27
- if (selectedColor != null) {
28
- return Object.values(Colors).includes(selectedColor as Colors)
29
- ? (selectedColor as Colors)
30
- : 'black';
31
- } else {
32
- return undefined;
33
- }
34
- }