sapo-components-ui-rn 1.0.37 → 1.0.39
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/components/SearchInput/index.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +1 -0
- package/dist/index.esm.js +6 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SearchInput/index.tsx +2 -5
- package/src/components/Tag/index.tsx +8 -2
- package/src/components/TextInput/TextInput.tsx +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle, StyleSheet, TextStyle } from "react-native";
|
|
3
3
|
import View from "../View";
|
|
4
|
-
import containerStyles from "../../theme/container-styles";
|
|
5
4
|
import Icon from "../Icon";
|
|
6
5
|
import TextInput from "../TextInput/TextInput";
|
|
7
6
|
import { useInternalTheme } from "../../core/theming";
|
|
@@ -32,6 +31,7 @@ const SearchInput = ({
|
|
|
32
31
|
onChangeText,
|
|
33
32
|
style,
|
|
34
33
|
height,
|
|
34
|
+
textStyle,
|
|
35
35
|
}: SearchInputProps) => {
|
|
36
36
|
const theme = useInternalTheme();
|
|
37
37
|
const { colors } = theme;
|
|
@@ -53,6 +53,7 @@ const SearchInput = ({
|
|
|
53
53
|
onBlur={onBlur}
|
|
54
54
|
allowFontScaling={false}
|
|
55
55
|
onChangeText={onChangeText}
|
|
56
|
+
textStyle={textStyle}
|
|
56
57
|
style={[
|
|
57
58
|
{
|
|
58
59
|
height: height || 40,
|
|
@@ -69,8 +70,4 @@ const SearchInput = ({
|
|
|
69
70
|
);
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
const styles = StyleSheet.create({
|
|
73
|
-
...containerStyles,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
73
|
export default SearchInput;
|
|
@@ -6,6 +6,7 @@ import Text from "../Text";
|
|
|
6
6
|
import { useInternalTheme } from "../../core/theming";
|
|
7
7
|
import containerStyles from "../../theme/container-styles";
|
|
8
8
|
import SvgIcon from "../IconSvg";
|
|
9
|
+
import Icon from "../Icon";
|
|
9
10
|
|
|
10
11
|
interface TagProps {
|
|
11
12
|
style?: StyleProp<ViewStyle>;
|
|
@@ -60,7 +61,7 @@ const Tag = ({
|
|
|
60
61
|
paddingHorizontal={CONSTANTS.SPACE_12}
|
|
61
62
|
paddingVertical={CONSTANTS.SPACE_8}
|
|
62
63
|
borderRadius={borderRadius}
|
|
63
|
-
|
|
64
|
+
center
|
|
64
65
|
style={[
|
|
65
66
|
disabled && {
|
|
66
67
|
backgroundColor: colors.surfaceSecondaryDefault,
|
|
@@ -98,7 +99,12 @@ const Tag = ({
|
|
|
98
99
|
<View />
|
|
99
100
|
) : (
|
|
100
101
|
<View paddingLeft={CONSTANTS.SPACE_4}>
|
|
101
|
-
<
|
|
102
|
+
<Icon
|
|
103
|
+
name={"IconClose"}
|
|
104
|
+
type="Svg"
|
|
105
|
+
size={20}
|
|
106
|
+
color={colors.iconBrandDefault}
|
|
107
|
+
/>
|
|
102
108
|
</View>
|
|
103
109
|
)}
|
|
104
110
|
</View>
|
|
@@ -166,6 +166,7 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
166
166
|
underlineStyle?: StyleProp<ViewStyle>;
|
|
167
167
|
minHeight?: number;
|
|
168
168
|
clearButton?: boolean;
|
|
169
|
+
textStyle?: StyleProp<TextStyle>;
|
|
169
170
|
};
|
|
170
171
|
|
|
171
172
|
interface CompoundedComponent
|
|
@@ -221,6 +222,7 @@ const TextInput = forwardRef<TextInputHandles, Props>(
|
|
|
221
222
|
theme: themeOverrides,
|
|
222
223
|
placeholderTextColor,
|
|
223
224
|
clearButton,
|
|
225
|
+
textStyle,
|
|
224
226
|
...rest
|
|
225
227
|
}: Props,
|
|
226
228
|
ref
|
|
@@ -510,7 +512,7 @@ const TextInput = forwardRef<TextInputHandles, Props>(
|
|
|
510
512
|
onLeftAffixLayoutChange={onLeftAffixLayoutChange}
|
|
511
513
|
onRightAffixLayoutChange={onRightAffixLayoutChange}
|
|
512
514
|
maxFontSizeMultiplier={maxFontSizeMultiplier}
|
|
513
|
-
contentStyle={contentStyle}
|
|
515
|
+
contentStyle={[contentStyle, textStyle]}
|
|
514
516
|
scaledLabel={scaledLabel}
|
|
515
517
|
/>
|
|
516
518
|
);
|