1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-10-16 14:37:33 +00:00

Change icons to view password in PasswordField

This commit is contained in:
Steffo 2024-01-09 08:50:51 +01:00
parent 58cb8de3ff
commit f6ae271655
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -4,8 +4,8 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.FavoriteBorder
import androidx.compose.material.icons.filled.RemoveRedEye
import androidx.compose.material.icons.outlined.RemoveRedEye
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LocalTextStyle
@ -87,12 +87,11 @@ fun PasswordField(
}
) {
Icon(
// TODO: Replace with better icons when possible
if(showPassword) {
Icons.Filled.Favorite
Icons.Filled.RemoveRedEye
}
else {
Icons.Filled.FavoriteBorder
Icons.Outlined.RemoveRedEye
},
if(showPassword) {
LocalContext.current.getString(R.string.password_hide)