@momo-kits/chip 0.0.65-beta.5 → 0.0.65-beta.53

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.
Files changed (2) hide show
  1. package/index.js +18 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -49,6 +49,7 @@ const Chip = props => {
49
49
  style,
50
50
  onIconPress,
51
51
  type,
52
+ whiteBackground,
52
53
  activeBackgroundColor,
53
54
  activeBorderColor,
54
55
  activeTextColor,
@@ -66,9 +67,15 @@ const Chip = props => {
66
67
  <TouchableOpacity
67
68
  style={[{alignSelf: 'baseline'}, style]}
68
69
  onPress={() => onPress?.(!active)}>
69
- <View style={[styles.container, active && selectedStyle]}>
70
+ <View
71
+ style={[
72
+ styles.container,
73
+ whiteBackground && {backgroundColor: Colors.black_01},
74
+ active && selectedStyle,
75
+ ]}>
70
76
  {image && <Image source={image} style={[mapImageSize]} />}
71
77
  <Text.Label2
78
+ weight="medium"
72
79
  style={[
73
80
  mapTextSize,
74
81
  {color: active ? activeTextColor : Colors.black_17},
@@ -80,7 +87,13 @@ const Chip = props => {
80
87
  onPress={onIconPress}
81
88
  disabled={!onIconPress}
82
89
  style={styles.iconContainer}>
83
- <Image source={iconSource} style={styles.icon} />
90
+ <Image
91
+ source={iconSource}
92
+ style={[
93
+ styles.icon,
94
+ type === 'removable' && {tintColor: Colors.black_12},
95
+ ]}
96
+ />
84
97
  </TouchableOpacity>
85
98
  )}
86
99
  </View>
@@ -102,7 +115,7 @@ const styles = StyleSheet.create({
102
115
  container: {
103
116
  borderRadius: Radius.L,
104
117
  flexDirection: 'row',
105
- paddingVertical: Spacing.XXS + Spacing.XS,
118
+ paddingVertical: Spacing.XS,
106
119
  paddingHorizontal: Spacing.S,
107
120
  justifyContent: 'center',
108
121
  alignItems: 'center',
@@ -139,6 +152,7 @@ Chip.propTypes = {
139
152
  activeBackgroundColor: PropTypes.string,
140
153
  activeBorderColor: PropTypes.string,
141
154
  activeTextColor: PropTypes.string,
155
+ whiteBackground: PropTypes.bool,
142
156
  };
143
157
 
144
158
  Chip.defaultProps = {
@@ -148,6 +162,7 @@ Chip.defaultProps = {
148
162
  activeBackgroundColor: Colors.pink_10,
149
163
  activeBorderColor: Colors.pink_06,
150
164
  activeTextColor: Colors.pink_03,
165
+ whiteBackground: false,
151
166
  };
152
167
 
153
168
  export default Chip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/chip",
3
- "version": "0.0.65-beta.5",
3
+ "version": "0.0.65-beta.53",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {