diff --git a/src/components/controls/PasswordInput/PasswordInput.tsx b/src/components/controls/PasswordInput/PasswordInput.tsx index fc32f8e79..15b9d2eba 100644 --- a/src/components/controls/PasswordInput/PasswordInput.tsx +++ b/src/components/controls/PasswordInput/PasswordInput.tsx @@ -25,10 +25,10 @@ export type PasswordInputProps = Omit & { showCopyButton?: boolean; /** Show reveal button */ showRevealButton?: boolean; - /** Disable the tooltip for the copy button. The tooltip will not be displayed */ - hasCopyTooltip?: boolean; - /** Disable the tooltip for the reveal button. The tooltip will not be displayed */ - hasRevealTooltip?: boolean; + /** Determines whether to display the tooltip for the copy button */ + showCopyTooltip?: boolean; + /** Determines whether to display the tooltip for the reveal button */ + showRevealTooltip?: boolean; /** Determines the visibility state of the password input field */ revealValue?: boolean; /** A callback function that is invoked whenever the revealValue state changes */ @@ -43,8 +43,8 @@ export const PasswordInput = (props: PasswordInputProps) => { endContent, showRevealButton, size = 'm', - hasCopyTooltip = true, - hasRevealTooltip = true, + showCopyTooltip, + showRevealTooltip, controlProps, } = props; @@ -62,11 +62,6 @@ export const PasswordInput = (props: PasswordInputProps) => { const {actionButtonSize, iconSize} = getActionButtonSizeAndIconSize(size); - const onClick: React.MouseEventHandler = (event) => { - event.preventDefault(); - setRevealValue(!revealValue); - }; - const additionalEndContent = ( {endContent || rightContent} @@ -74,25 +69,26 @@ export const PasswordInput = (props: PasswordInputProps) => { ) : null} {showRevealButton ? (