Initial commit: HealthManager full-stack health management platform
Backend: .NET 10 + PostgreSQL + EF Core + JWT + SignalR Frontend patient: React 19 + TypeScript + Vite (mobile H5) Frontend doctor: React 19 + TypeScript + Vite (desktop web)
This commit is contained in:
16
frontend-patient/src/components/common/Input.tsx
Normal file
16
frontend-patient/src/components/common/Input.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import styles from './Input.module.css';
|
||||
|
||||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
label?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export function Input({ label, error, className = '', ...rest }: InputProps) {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
{label && <label className={styles.label}>{label}</label>}
|
||||
<input className={`${styles.input} ${error ? styles.hasError : ''} ${className}`} {...rest} />
|
||||
{error && <span className={styles.error}>{error}</span>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user