Skip to content

Commit

Permalink
toggle show/hide password icon according to behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanth-sunkireddy committed Jul 3, 2024
1 parent 7a7ef0c commit abef913
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file added src/assets/icons/show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/screens/Login/components/Credentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ function Credentials({
togglePasswordView,
displayPassword
}: CredentialsProps) {

const passwordIcon = displayPassword
? require("../../../assets/icons/show.png")
: require("../../../assets/icons/hide.png");


return (
<SafeAreaView>
<View>
Expand Down Expand Up @@ -53,7 +59,7 @@ function Credentials({
</Text>
</View>
<View style={{ display: "flex", flexDirection: "row" }}>
<TextInput
<TextInput
style={{
...global.input,
color: "#000000",
Expand All @@ -68,7 +74,7 @@ function Credentials({
/>
<TouchableOpacity onPress={togglePasswordView}>
<Image
source={require("../../../assets/icons/hide.png")}
source={passwordIcon}
style={{
height: 30,
width: 35,
Expand Down

0 comments on commit abef913

Please sign in to comment.