mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-20 10:05:56 +00:00
Updated PasswordField Icons and made it accessible
This commit is contained in:
parent
373370f80e
commit
431c1fe9b3
@ -1,4 +1,4 @@
|
||||
import { InputAdornment, TextField, TextFieldProps, styled } from "@mui/material";
|
||||
import { Button, InputAdornment, TextField, TextFieldProps, styled } from "@mui/material";
|
||||
import { useState } from 'react'
|
||||
|
||||
export const CustomInput = styled(TextField)({
|
||||
@ -48,12 +48,10 @@ export const PasswordField: React.FunctionComponent<TextFieldProps> = ({ ...prop
|
||||
type={canViewPassword ? 'text' : 'password'}
|
||||
InputProps={{
|
||||
endAdornment: (
|
||||
<InputAdornment position="end" data-testid="toggle-view-password-btn" style={{
|
||||
cursor: 'pointer'
|
||||
}} onClick={() => {
|
||||
<InputAdornment position="end" data-testid="toggle-view-password-btn" onClick={() => {
|
||||
setCanViewPassword((prevState) => !prevState)
|
||||
}}>
|
||||
{canViewPassword ? <span data-testid="plain-text-indicator">🙀</span> : <span data-testid="password-text-indicator">😸</span>}
|
||||
{canViewPassword ? <Button data-testid="plain-text-indicator" sx={{ minWidth: 0, p: 0 }}>👁️</Button> : <Button data-testid="password-text-indicator" sx={{ minWidth: 0, p: 0 }}>👁️🗨️</Button>}
|
||||
</InputAdornment>
|
||||
)
|
||||
}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user