Skip to content

Commit

Permalink
Fix Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jan 10, 2025
1 parent 7e8c741 commit ee549d9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,21 @@ export default function SettingsPage() {
<button
type="button"
onClick={() => {
if (credentialSource !== "env" || credentialSource !== "self") {
if (credentialSource !== "env") {
setShowPassword(!showPassword);
}
}}
disabled={credentialSource === "env" || credentialSource === "self"}
disabled={credentialSource === "env"}
className={`absolute inset-y-0 right-0 pr-3 flex items-center ${
credentialSource === "env" ? "cursor-not-allowed text-muted-foreground" : "text-muted-foreground hover:text-foreground"
}`}
>
{showPassword ? (
<EyeOff className="h-4 w-4" />
) : (
<Eye className="h-4 w-4" />
)}
</button>
</TooltipTrigger>
<TooltipContent>
{showPassword
Expand Down

0 comments on commit ee549d9

Please sign in to comment.