@momo-kits/calculator-keyboard 0.77.23 → 0.77.24

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,12 +1,10 @@
1
1
  import React from 'react';
2
+ import {StyleSheet, TouchableOpacity, View, Text} from 'react-native';
2
3
  import {
3
- View,
4
- TouchableOpacity,
5
- StyleSheet,
6
- Text,
7
- ImageSourcePropType,
8
- } from 'react-native';
9
- import {Colors as ColorCore, Image as FastImage} from '@momo-kits/foundation';
4
+ Colors as ColorCore,
5
+ Image as FastImage,
6
+ scaleSize,
7
+ } from '@momo-kits/foundation';
10
8
  import {Source} from 'react-native-fast-image';
11
9
 
12
10
  interface KeyButtonProps {
@@ -37,6 +35,12 @@ const styles = StyleSheet.create({
37
35
  flex: 1,
38
36
  borderRadius: 5,
39
37
  },
38
+ text: {
39
+ fontSize: scaleSize(24),
40
+ lineHeight: scaleSize(32),
41
+ fontFamily: 'SFProText-Semibold',
42
+ color: ColorCore.black_20,
43
+ },
40
44
  });
41
45
 
42
46
  const KeyButton: React.FC<KeyButtonProps> = ({
@@ -52,9 +56,11 @@ const KeyButton: React.FC<KeyButtonProps> = ({
52
56
  }) => {
53
57
  let content = null;
54
58
  if (icon) {
55
- content = <FastImage source={icon} style={size} />;
59
+ content = (
60
+ <FastImage tintColor={ColorCore.black_20} source={icon} style={size} />
61
+ );
56
62
  } else {
57
- content = <Text style={textStyle}>{text}</Text>;
63
+ content = <Text style={[textStyle, styles.text]}>{text}</Text>;
58
64
  }
59
65
 
60
66
  const buttonLongPress = () => onLongPress(text);
package/index.tsx CHANGED
@@ -33,7 +33,7 @@ const isIphoneX = (): boolean =>
33
33
 
34
34
  const styles = StyleSheet.create({
35
35
  eqBtnWrapper: {
36
- backgroundColor: '#ad076b',
36
+ backgroundColor: ColorCore.black_06,
37
37
  },
38
38
  specialBtnWrapper: {
39
39
  backgroundColor: '#FFF',
@@ -77,41 +77,33 @@ const CALCULATOR_BUTTONS = [
77
77
  {
78
78
  text: 'AC',
79
79
  icon: null,
80
- backgroundColor: ColorCore.pink_08,
81
- textWeight: 'bold',
82
- textStyle: {
83
- color: ColorCore.black_01,
84
- fontSize: scaleSize(20),
85
- fontWeight: 'bold',
86
- },
80
+ backgroundColor: ColorCore.black_06,
87
81
  },
88
82
  {
89
83
  text: '÷',
90
84
  size: {width: 18, height: 18},
91
- backgroundColor: ColorCore.pink_08,
92
- textStyle: styles.textPink,
85
+ backgroundColor: ColorCore.black_06,
93
86
  },
94
87
  {
95
88
  text: '×',
96
89
  size: {width: 14, height: 14},
97
- backgroundColor: ColorCore.pink_08,
98
- textStyle: styles.textPink,
90
+ backgroundColor: ColorCore.black_06,
99
91
  },
100
92
  ],
101
93
  [
102
- {text: '7', icon: null, textStyle: styles.textNormal},
103
- {text: '8', icon: null, textStyle: styles.textNormal},
104
- {text: '9', icon: null, textStyle: styles.textNormal},
94
+ {text: '7', icon: null},
95
+ {text: '8', icon: null},
96
+ {text: '9', icon: null},
105
97
  ],
106
98
  [
107
- {text: '4', icon: null, textStyle: styles.textNormal},
108
- {text: '5', icon: null, textStyle: styles.textNormal},
109
- {text: '6', icon: null, textStyle: styles.textNormal},
99
+ {text: '4', icon: null},
100
+ {text: '5', icon: null},
101
+ {text: '6', icon: null},
110
102
  ],
111
103
  [
112
- {text: '1', icon: null, textStyle: styles.textNormal},
113
- {text: '2', icon: null, textStyle: styles.textNormal},
114
- {text: '3', icon: null, textStyle: styles.textNormal},
104
+ {text: '1', icon: null},
105
+ {text: '2', icon: null},
106
+ {text: '3', icon: null},
115
107
  ],
116
108
  ];
117
109
 
@@ -231,12 +223,12 @@ const KeyboardCalculator: React.FC<KeyboardCalculatorProps> = ({onPress}) => {
231
223
  {renderBtn({
232
224
  width: BUTTON_WIDTH,
233
225
  text: 'REMOVE',
234
- backgroundColor: ColorCore.pink_08,
226
+ backgroundColor: ColorCore.black_06,
235
227
  icon: REMOVE_ICON,
236
228
  size: {
237
229
  width: 24,
238
230
  height: 24,
239
- tintColor: ColorCore.black_01,
231
+ tintColor: ColorCore.black_20,
240
232
  },
241
233
  })}
242
234
  </Row>
@@ -244,7 +236,7 @@ const KeyboardCalculator: React.FC<KeyboardCalculatorProps> = ({onPress}) => {
244
236
  {renderBtn({
245
237
  width: BUTTON_WIDTH,
246
238
  text: '-',
247
- backgroundColor: ColorCore.pink_08,
239
+ backgroundColor: ColorCore.black_06,
248
240
  textStyle: styles.textPink,
249
241
  })}
250
242
  </Row>
@@ -252,7 +244,7 @@ const KeyboardCalculator: React.FC<KeyboardCalculatorProps> = ({onPress}) => {
252
244
  {renderBtn({
253
245
  width: BUTTON_WIDTH,
254
246
  text: '+',
255
- backgroundColor: ColorCore.pink_08,
247
+ backgroundColor: ColorCore.black_06,
256
248
  textStyle: styles.textPink,
257
249
  })}
258
250
  </Row>
@@ -262,7 +254,7 @@ const KeyboardCalculator: React.FC<KeyboardCalculatorProps> = ({onPress}) => {
262
254
  {renderBtn({
263
255
  width: BUTTON_WIDTH,
264
256
  text: '=',
265
- backgroundColor: ColorCore.pink_03,
257
+ backgroundColor: ColorCore.black_06,
266
258
  textStyle: styles.textEqual,
267
259
  })}
268
260
  </Row>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/calculator-keyboard",
3
- "version": "0.77.23",
3
+ "version": "0.77.24",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {
Binary file
Binary file
Binary file