added password visibility toggle

This commit is contained in:
medentem
2024-10-02 15:54:53 -05:00
parent 06d2c393ce
commit 4b532fc7f8
4 changed files with 30 additions and 6 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import {
import type { LucideIcon } from "lucide-react";
export interface GeneratorProps extends React.BaseHTMLAttributes<HTMLElement> {
hide?: boolean;
type: "text" | "password";
devicePSKBitCount?: number;
value: string;
variant: "default" | "invalid";
@@ -31,7 +31,7 @@ export interface GeneratorProps extends React.BaseHTMLAttributes<HTMLElement> {
const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>(
(
{
hide = true,
type,
devicePSKBitCount,
variant,
value,
@@ -68,7 +68,7 @@ const Generator = React.forwardRef<HTMLInputElement, GeneratorProps>(
return (
<>
<Input
type={hide ? "password" : "text"}
type={type}
id="pskInput"
variant={variant}
value={value}