@momo-kits/chip 0.151.1-beta.3 → 0.151.1-beta.5
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.
- package/index.tsx +6 -0
- package/package.json +1 -1
- package/styles.ts +7 -7
package/index.tsx
CHANGED
|
@@ -85,6 +85,8 @@ const Chip: FC<ChipProps> = ({
|
|
|
85
85
|
chipStyle,
|
|
86
86
|
{
|
|
87
87
|
backgroundColor: bgColor,
|
|
88
|
+
maxWidth: '100%',
|
|
89
|
+
flexShrink: 1
|
|
88
90
|
},
|
|
89
91
|
]}
|
|
90
92
|
accessibilityLabel={componentId + '|touch'}
|
|
@@ -101,6 +103,10 @@ const Chip: FC<ChipProps> = ({
|
|
|
101
103
|
<Text
|
|
102
104
|
typography={typo}
|
|
103
105
|
color={textColor}
|
|
106
|
+
numberOfLines={1}
|
|
107
|
+
style={{
|
|
108
|
+
flexShrink: 1,
|
|
109
|
+
}}
|
|
104
110
|
accessibilityLabel={componentId + '|text'}>
|
|
105
111
|
{label}
|
|
106
112
|
</Text>
|
package/package.json
CHANGED
package/styles.ts
CHANGED
|
@@ -3,16 +3,16 @@ import {Radius, scaleSize, Spacing} from '@momo-kits/foundation';
|
|
|
3
3
|
|
|
4
4
|
export default StyleSheet.create({
|
|
5
5
|
chip: {
|
|
6
|
-
borderRadius: Radius.L,
|
|
7
|
-
paddingHorizontal: Spacing.S,
|
|
6
|
+
borderRadius: scaleSize(Radius.L),
|
|
7
|
+
paddingHorizontal: scaleSize(Spacing.S),
|
|
8
8
|
height: scaleSize(32),
|
|
9
9
|
justifyContent: 'center',
|
|
10
10
|
alignItems: 'center',
|
|
11
11
|
flexDirection: 'row',
|
|
12
12
|
},
|
|
13
13
|
smallChip: {
|
|
14
|
-
borderRadius: Radius.L,
|
|
15
|
-
paddingHorizontal: Spacing.S,
|
|
14
|
+
borderRadius: scaleSize(Radius.L),
|
|
15
|
+
paddingHorizontal: scaleSize(Spacing.S),
|
|
16
16
|
height: scaleSize(24),
|
|
17
17
|
justifyContent: 'center',
|
|
18
18
|
alignItems: 'center',
|
|
@@ -27,15 +27,15 @@ export default StyleSheet.create({
|
|
|
27
27
|
right: 0,
|
|
28
28
|
zIndex: -1,
|
|
29
29
|
borderWidth: 2,
|
|
30
|
-
borderRadius: Radius.L,
|
|
30
|
+
borderRadius: scaleSize(Radius.L),
|
|
31
31
|
},
|
|
32
32
|
imageSmall: {
|
|
33
33
|
width: scaleSize(16),
|
|
34
34
|
height: scaleSize(16),
|
|
35
|
-
marginRight: Spacing.XS,
|
|
35
|
+
marginRight: scaleSize(Spacing.XS),
|
|
36
36
|
},
|
|
37
37
|
icon: {
|
|
38
|
-
marginLeft: Spacing.XS,
|
|
38
|
+
marginLeft: scaleSize(Spacing.XS),
|
|
39
39
|
},
|
|
40
40
|
wrapper: {flexDirection: 'row'},
|
|
41
41
|
});
|