Skip to content

Commit

Permalink
Fix 5880: Password component unnecessary wrapper (#5881)
Browse files Browse the repository at this point in the history
* Added empty message into tree

* Fix: Added TS Support to Doc Highlights

* Revert "Fix: Added TS Support to Doc Highlights"

This reverts commit 653a959.

* Fix: Removed unnecessary wrapper
  • Loading branch information
nitrogenous authored Feb 5, 2024
1 parent ee907a3 commit a772a75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/password/Password.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ export const Password = React.memo(
const showIconProps = mergeProps(ptm('showIcon'));

if (unmaskedState) {
icon = props.hideIcon || <EyeSlashIcon {...hideIconProps} />;
icon = props.hideIcon || <EyeSlashIcon {...hideIconProps} onClick={toggleMask} />;
} else {
icon = props.showIcon || <EyeIcon {...showIconProps} />;
icon = props.showIcon || <EyeIcon {...showIconProps} onClick={toggleMask} />;
}

const eyeIcon = IconUtils.getJSXIcon(icon, unmaskedState ? { ...hideIconProps } : { ...showIconProps }, { props });

if (props.toggleMask) {
let content = <i onClick={toggleMask}> {eyeIcon} </i>;
let content = eyeIcon;

if (props.icon) {
const defaultIconOptions = {
Expand Down

0 comments on commit a772a75

Please sign in to comment.