// src/components/auth/LoginForm.js import React, { useState } from 'react'; import { Box, TextField, Button, Typography, InputAdornment, IconButton } from '@mui/material'; import { Visibility, VisibilityOff } from '@mui/icons-material'; const LoginForm = ({ onSubmit, error }) => { const [userId, setUserId] = useState(''); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const handleSubmit = (e) => { e.preventDefault(); onSubmit(userId, password); }; return ( 마이구독 로고 setUserId(e.target.value)} error={!!error} autoComplete="username" required /> setPassword(e.target.value)} error={!!error} autoComplete="current-password" required InputProps={{ endAdornment: ( setShowPassword(!showPassword)} edge="end" > {showPassword ? : } ), }} /> {error && ( {error} )} ); }; export default LoginForm;