sapo-components-ui-rn 1.0.39 → 1.0.41
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/dist/index.esm.js +23 -21
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Tag/index.tsx +55 -55
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { CONSTANTS } from "../../styles/themes/tokens";
|
|
|
5
5
|
import Text from "../Text";
|
|
6
6
|
import { useInternalTheme } from "../../core/theming";
|
|
7
7
|
import containerStyles from "../../theme/container-styles";
|
|
8
|
-
import SvgIcon from "../IconSvg";
|
|
9
8
|
import Icon from "../Icon";
|
|
10
9
|
|
|
11
10
|
interface TagProps {
|
|
@@ -53,61 +52,62 @@ const Tag = ({
|
|
|
53
52
|
}, [isActive]);
|
|
54
53
|
|
|
55
54
|
return (
|
|
56
|
-
<View
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
>
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<View paddingLeft={CONSTANTS.SPACE_4}>{rightIcon}</View>
|
|
98
|
-
) : hideRightIcon ? (
|
|
99
|
-
<View />
|
|
100
|
-
) : (
|
|
101
|
-
<View paddingLeft={CONSTANTS.SPACE_4}>
|
|
102
|
-
<Icon
|
|
103
|
-
name={"IconClose"}
|
|
104
|
-
type="Svg"
|
|
105
|
-
size={20}
|
|
106
|
-
color={colors.iconBrandDefault}
|
|
107
|
-
/>
|
|
108
|
-
</View>
|
|
109
|
-
)}
|
|
55
|
+
<View
|
|
56
|
+
row
|
|
57
|
+
height={height}
|
|
58
|
+
disabled={disabled}
|
|
59
|
+
paddingHorizontal={CONSTANTS.SPACE_12}
|
|
60
|
+
paddingVertical={CONSTANTS.SPACE_8}
|
|
61
|
+
borderRadius={borderRadius}
|
|
62
|
+
center
|
|
63
|
+
style={[
|
|
64
|
+
disabled && {
|
|
65
|
+
backgroundColor: colors.surfaceSecondaryDefault,
|
|
66
|
+
borderColor: colors.surfaceSecondaryDefault,
|
|
67
|
+
},
|
|
68
|
+
style,
|
|
69
|
+
]}
|
|
70
|
+
onPress={handlePressTag}
|
|
71
|
+
backgroundColor={
|
|
72
|
+
active
|
|
73
|
+
? colors.surfaceBrandInversePressed
|
|
74
|
+
: colors.surfaceBrandInverseDefault
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
{leftIcon && <View paddingRight={CONSTANTS.SPACE_4}>{leftIcon}</View>}
|
|
78
|
+
<View>
|
|
79
|
+
<Text
|
|
80
|
+
size={14}
|
|
81
|
+
numberOfLines={numberOfLines}
|
|
82
|
+
ellipsizeMode={ellipsizeMode}
|
|
83
|
+
style={[
|
|
84
|
+
styles.textMedium,
|
|
85
|
+
{
|
|
86
|
+
lineHeight: 16,
|
|
87
|
+
},
|
|
88
|
+
disabled && {
|
|
89
|
+
color: colors.textSecondary,
|
|
90
|
+
},
|
|
91
|
+
textStyle,
|
|
92
|
+
]}
|
|
93
|
+
>
|
|
94
|
+
{title}
|
|
95
|
+
</Text>
|
|
110
96
|
</View>
|
|
97
|
+
{rightIcon ? (
|
|
98
|
+
<View paddingLeft={CONSTANTS.SPACE_4}>{rightIcon}</View>
|
|
99
|
+
) : hideRightIcon ? (
|
|
100
|
+
<View />
|
|
101
|
+
) : (
|
|
102
|
+
<View paddingLeft={CONSTANTS.SPACE_4}>
|
|
103
|
+
<Icon
|
|
104
|
+
name={"IconClose"}
|
|
105
|
+
type="Svg"
|
|
106
|
+
size={20}
|
|
107
|
+
color={colors.iconBrandDefault}
|
|
108
|
+
/>
|
|
109
|
+
</View>
|
|
110
|
+
)}
|
|
111
111
|
</View>
|
|
112
112
|
);
|
|
113
113
|
};
|