added password visibility toggle
This commit is contained in:
1 parent
06d2c393ce
commit
4b532fc7f8
4 files changed
+30
-6
No files matched your search
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user