@nativetail/ui 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -38,8 +38,9 @@ export function FloatingInput({
|
|
38
38
|
const onBlur = useCallback(() => {
|
39
39
|
setIsFocused(false);
|
40
40
|
}, []);
|
41
|
-
const
|
42
|
-
|
41
|
+
const [showPassword, setShowPassword] = useState(
|
42
|
+
isSecretToggleable ? false : true
|
43
|
+
);
|
43
44
|
return (
|
44
45
|
<>
|
45
46
|
<View
|
@@ -32,7 +32,10 @@ export function Input({
|
|
32
32
|
...props
|
33
33
|
}: InputProps) {
|
34
34
|
const tw = useTw();
|
35
|
-
|
35
|
+
|
36
|
+
const [showPassword, setShowPassword] = useState(
|
37
|
+
isSecretToggleable ? false : true
|
38
|
+
);
|
36
39
|
return (
|
37
40
|
<View className={cn("w-full gap-1", containerClassName)}>
|
38
41
|
<Text className={cn("text-muted/75 duration-75 ")}>{label}</Text>
|
@@ -55,6 +58,10 @@ export function Input({
|
|
55
58
|
{leftElement && (
|
56
59
|
<View className="absolute left-2 bottom-2">{leftElement}</View>
|
57
60
|
)}
|
61
|
+
|
62
|
+
{rightElement && (
|
63
|
+
<View className="absolute right-2 bottom-2">{rightElement}</View>
|
64
|
+
)}
|
58
65
|
{error && <Text className="text-danger text-sm">{error}</Text>}
|
59
66
|
|
60
67
|
{isSecretToggleable && (
|