sapo-components-ui-rn 1.0.39 → 1.0.40
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 +20 -21
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Tag/index.tsx +52 -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,59 @@ 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
|
-
</Text>
|
|
95
|
-
</View>
|
|
96
|
-
{rightIcon ? (
|
|
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
|
+
disabled && {
|
|
86
|
+
color: colors.textSecondary,
|
|
87
|
+
},
|
|
88
|
+
textStyle,
|
|
89
|
+
]}
|
|
90
|
+
>
|
|
91
|
+
{title}
|
|
92
|
+
</Text>
|
|
110
93
|
</View>
|
|
94
|
+
{rightIcon ? (
|
|
95
|
+
<View paddingLeft={CONSTANTS.SPACE_4}>{rightIcon}</View>
|
|
96
|
+
) : hideRightIcon ? (
|
|
97
|
+
<View />
|
|
98
|
+
) : (
|
|
99
|
+
<View paddingLeft={CONSTANTS.SPACE_4}>
|
|
100
|
+
<Icon
|
|
101
|
+
name={"IconClose"}
|
|
102
|
+
type="Svg"
|
|
103
|
+
size={20}
|
|
104
|
+
color={colors.iconBrandDefault}
|
|
105
|
+
/>
|
|
106
|
+
</View>
|
|
107
|
+
)}
|
|
111
108
|
</View>
|
|
112
109
|
);
|
|
113
110
|
};
|