Skip to content

Commit

Permalink
fix: reval value logic
Browse files Browse the repository at this point in the history
  • Loading branch information
NasgulNexus committed Oct 15, 2024
1 parent 3215b14 commit c9643fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/controls/PasswordInput/PasswordInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const PasswordInput = (props: PasswordInputProps) => {
{showRevealButton ? (
<ActionTooltip
disabled={!hasRevealTooltip}
title={revealValue ? i18n('label_show-password') : i18n('label_hide-password')}
title={revealValue ? i18n('label_hide-password') : i18n('label_show-password')}
>
<Button
view="flat-secondary"
Expand All @@ -91,11 +91,11 @@ export const PasswordInput = (props: PasswordInputProps) => {
size={actionButtonSize}
extraProps={{
'aria-label': revealValue
? i18n('label_show-password')
: i18n('label_hide-password'),
? i18n('label_hide-password')
: i18n('label_show-password'),
}}
>
<Icon data={revealValue ? Eye : EyeSlash} size={iconSize} />
<Icon data={revealValue ? EyeSlash : Eye} size={iconSize} />
</Button>
</ActionTooltip>
) : null}
Expand All @@ -105,7 +105,7 @@ export const PasswordInput = (props: PasswordInputProps) => {
return (
<TextInput
{...props}
type={revealValue ? 'password' : 'text'}
type={revealValue ? 'text' : 'password'}
unstable_endContent={additionalEndContent}
autoComplete={autoComplete ? autoComplete : 'new-password'}
controlProps={{
Expand Down

0 comments on commit c9643fc

Please sign in to comment.