File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
src/components/common/input Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 11import { IcEyeClosed , IcEyeOpen } from '@/assets/IconList'
2- import { FieldValues , UseFormRegister } from 'react-hook-form'
32
43import { useToggle } from '@/hooks/useToggle'
54
65import { TextInput , TextInputProps } from './TextInput'
76
8- interface PasswordInputProps
9- extends Omit < TextInputProps , 'startAdornment' | 'endAdornment' | 'type' > {
10- error ?: boolean
11- register ?: ReturnType < UseFormRegister < FieldValues > >
12- className ?: string
13- fullWidth ?: boolean
14- }
7+ type PasswordInputProps = Omit <
8+ TextInputProps ,
9+ 'startAdornment' | 'endAdornment' | 'type'
10+ >
1511
1612export const PasswordInput = ( {
17- error = false ,
18- register,
19- className = '' ,
20- fullWidth = false ,
2113 ...props
2214} : PasswordInputProps ) : JSX . Element => {
2315 const { isOpen : showPassword , toggle : toggleShowPassword } = useToggle ( )
@@ -29,9 +21,7 @@ export const PasswordInput = ({
2921
3022 return (
3123 < TextInput
32- { ...register }
3324 type = { showPassword ? 'text' : 'password' }
34- fullWidth = { fullWidth }
3525 endAdornment = {
3626 < button
3727 aria-label = { showPassword ? '비밀번호 숨김' : '비밀번호 보임' }
You can’t perform that action at this time.
0 commit comments