import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { UserRole } from '../types'; import { Button } from './Button'; import { Heart } from 'lucide-react'; interface LoginScreenProps { onLogin: (role: UserRole) => void; } export const LoginScreen: React.FC = ({ onLogin }) => { const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); const handleLogin = (e: React.FormEvent) => { e.preventDefault(); const user = username.toLowerCase().trim(); const pass = password.trim(); if (pass !== 'password') { setError('Wrong password! Hint: password'); return; } if (user === 'mom') { onLogin('mom'); } else if (user === 'dad') { onLogin('dad'); } else { setError('Username must be "mom" or "dad"'); } }; return (
{/* Background decorative blobs */}

Welcome Home

Shared Calendar App

{ setUsername(e.target.value); setError(''); }} className="w-full px-6 py-4 rounded-2xl bg-gray-800 border-2 border-transparent focus:bg-gray-700 focus:border-blue-500 focus:ring-0 transition-all font-bold text-gray-200 placeholder-gray-500 outline-none" />
{ setPassword(e.target.value); setError(''); }} className="w-full px-6 py-4 rounded-2xl bg-gray-800 border-2 border-transparent focus:bg-gray-700 focus:border-blue-500 focus:ring-0 transition-all font-bold text-gray-200 placeholder-gray-500 outline-none" />
{error && ( {error} )}

Secure • Shared • Simple

); };