@kiosinc/commons-rn 0.1.18 → 0.1.20
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/lib/commonjs/auth/screens/LoginScreen.js +4 -8
- package/lib/commonjs/auth/screens/LoginScreen.js.map +1 -1
- package/lib/commonjs/auth/screens/ResetPassword.js +4 -2
- package/lib/commonjs/auth/screens/ResetPassword.js.map +1 -1
- package/lib/commonjs/auth/screens/SignUp.js +4 -1
- package/lib/commonjs/auth/screens/SignUp.js.map +1 -1
- package/lib/commonjs/auth/screens/SignUpPassword.js +4 -1
- package/lib/commonjs/auth/screens/SignUpPassword.js.map +1 -1
- package/lib/commonjs/auth/screens/VerifyPhoneNumber.js +4 -1
- package/lib/commonjs/auth/screens/VerifyPhoneNumber.js.map +1 -1
- package/lib/commonjs/components/Alert.js +11 -1
- package/lib/commonjs/components/Alert.js.map +1 -1
- package/lib/commonjs/components/Snackbar.js +9 -0
- package/lib/commonjs/components/Snackbar.js.map +1 -1
- package/lib/commonjs/components/TextInput.js +4 -2
- package/lib/commonjs/components/TextInput.js.map +1 -1
- package/lib/module/auth/screens/LoginScreen.js +5 -9
- package/lib/module/auth/screens/LoginScreen.js.map +1 -1
- package/lib/module/auth/screens/ResetPassword.js +5 -3
- package/lib/module/auth/screens/ResetPassword.js.map +1 -1
- package/lib/module/auth/screens/SignUp.js +5 -2
- package/lib/module/auth/screens/SignUp.js.map +1 -1
- package/lib/module/auth/screens/SignUpPassword.js +5 -2
- package/lib/module/auth/screens/SignUpPassword.js.map +1 -1
- package/lib/module/auth/screens/VerifyPhoneNumber.js +5 -2
- package/lib/module/auth/screens/VerifyPhoneNumber.js.map +1 -1
- package/lib/module/components/Alert.js +12 -1
- package/lib/module/components/Alert.js.map +1 -1
- package/lib/module/components/Snackbar.js +9 -0
- package/lib/module/components/Snackbar.js.map +1 -1
- package/lib/module/components/TextInput.js +4 -2
- package/lib/module/components/TextInput.js.map +1 -1
- package/lib/typescript/src/auth/screens/LoginScreen.d.ts.map +1 -1
- package/lib/typescript/src/auth/screens/ResetPassword.d.ts.map +1 -1
- package/lib/typescript/src/auth/screens/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/auth/screens/SignUpPassword.d.ts.map +1 -1
- package/lib/typescript/src/auth/screens/VerifyPhoneNumber.d.ts.map +1 -1
- package/lib/typescript/src/components/Alert.d.ts.map +1 -1
- package/lib/typescript/src/components/Snackbar.d.ts.map +1 -1
- package/lib/typescript/src/components/TextInput.d.ts +1 -0
- package/lib/typescript/src/components/TextInput.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/auth/screens/LoginScreen.tsx +85 -91
- package/src/auth/screens/ResetPassword.tsx +46 -42
- package/src/auth/screens/SignUp.tsx +105 -101
- package/src/auth/screens/SignUpPassword.tsx +68 -64
- package/src/auth/screens/VerifyPhoneNumber.tsx +55 -51
- package/src/components/Alert.tsx +14 -3
- package/src/components/Snackbar.tsx +6 -0
- package/src/components/TextInput.tsx +11 -6
|
@@ -49,6 +49,7 @@ const restyleFunctions = composeRestyleFunctions<ThemeType, RestyleProps>([
|
|
|
49
49
|
type Props = RestyleProps &
|
|
50
50
|
TextInputProps & {
|
|
51
51
|
errorMessage?: string;
|
|
52
|
+
rightIcon?: React.ReactNode;
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
export const TextInputStyled = ({ ...rest }: Props) => {
|
|
@@ -60,6 +61,7 @@ export const TextInputStyled = ({ ...rest }: Props) => {
|
|
|
60
61
|
export const TextInput: React.FC<Props> = ({
|
|
61
62
|
errorMessage,
|
|
62
63
|
secureTextEntry,
|
|
64
|
+
rightIcon,
|
|
63
65
|
...rest
|
|
64
66
|
}) => {
|
|
65
67
|
const [status, setStatus] = React.useState('checked');
|
|
@@ -78,7 +80,7 @@ export const TextInput: React.FC<Props> = ({
|
|
|
78
80
|
secureTextEntry={shouldShowPassword && secureTextEntry}
|
|
79
81
|
{...rest}
|
|
80
82
|
/>
|
|
81
|
-
{secureTextEntry && (
|
|
83
|
+
{(secureTextEntry || rightIcon) && (
|
|
82
84
|
<View
|
|
83
85
|
pt="4"
|
|
84
86
|
justifyContent="center"
|
|
@@ -86,11 +88,13 @@ export const TextInput: React.FC<Props> = ({
|
|
|
86
88
|
position="absolute"
|
|
87
89
|
width={48}
|
|
88
90
|
>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
{rightIcon ?? (
|
|
92
|
+
<ToggleButton
|
|
93
|
+
icon={shouldShowPassword ? 'eye' : 'eye-off'}
|
|
94
|
+
size={20}
|
|
95
|
+
onPress={onButtonToggle}
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
94
98
|
</View>
|
|
95
99
|
)}
|
|
96
100
|
</View>
|
|
@@ -103,6 +107,7 @@ export const TextInput: React.FC<Props> = ({
|
|
|
103
107
|
size={14}
|
|
104
108
|
width={20}
|
|
105
109
|
margin="0"
|
|
110
|
+
bg={'background'}
|
|
106
111
|
iconColor={theme.colors.error}
|
|
107
112
|
/>
|
|
108
113
|
<Text variant="bodySmall" color="error">
|