AutoCapitalize new exercise name

This commit is contained in:
AG
2025-11-28 22:38:56 +02:00
parent 1eafce6f2c
commit 2aacfb492d
3 changed files with 4 additions and 1 deletions

View File

@@ -78,6 +78,7 @@ const ExerciseModal: React.FC<ExerciseModalProps> = ({ isOpen, onClose, onSave,
}} }}
type="text" type="text"
autoFocus autoFocus
autocapitalize="words"
/> />
{error && ( {error && (
<p className="text-xs text-error mt-2 ml-3">{error}</p> <p className="text-xs text-error mt-2 ml-3">{error}</p>

View File

@@ -9,9 +9,10 @@ interface FilledInputProps {
autoFocus?: boolean; autoFocus?: boolean;
step?: string; step?: string;
inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal"; inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal";
autocapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters";
} }
const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, type = "number", icon, autoFocus, step, inputMode }) => ( const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, type = "number", icon, autoFocus, step, inputMode, autocapitalize }) => (
<div className="relative group bg-surface-container-high rounded-t-lg border-b border-outline-variant hover:bg-white/5 focus-within:border-primary transition-colors"> <div className="relative group bg-surface-container-high rounded-t-lg border-b border-outline-variant hover:bg-white/5 focus-within:border-primary transition-colors">
<label className="absolute top-2 left-4 text-[10px] font-medium text-on-surface-variant flex items-center gap-1"> <label className="absolute top-2 left-4 text-[10px] font-medium text-on-surface-variant flex items-center gap-1">
{icon} {label} {icon} {label}
@@ -25,6 +26,7 @@ const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, type
placeholder="0" placeholder="0"
value={value} value={value}
onChange={onChange} onChange={onChange}
autoCapitalize={autocapitalize}
/> />
</div> </div>
); );

Binary file not shown.