fix: type

This commit is contained in:
nafees nazik
2023-11-29 22:37:33 +05:30
parent 1e29dfd823
commit 0b2dce2238

View File

@ -6,14 +6,13 @@ import { cn } from '../lib/utils';
import { Button } from './button'; import { Button } from './button';
import { Input, InputProps } from './input'; import { Input, InputProps } from './input';
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>( const PasswordInput = React.forwardRef<HTMLInputElement, Omit<InputProps, 'type'>>(
({ className, ...props }, ref) => { ({ className, ...props }, ref) => {
const [showPassword, setShowPassword] = React.useState(false); const [showPassword, setShowPassword] = React.useState(false);
return ( return (
<div className="relative"> <div className="relative">
<Input <Input
id="password"
type={showPassword ? 'text' : 'password'} type={showPassword ? 'text' : 'password'}
className={cn('pr-10', className)} className={cn('pr-10', className)}
ref={ref} ref={ref}