AutoCapitalize new exercise name
This commit is contained in:
@@ -78,6 +78,7 @@ const ExerciseModal: React.FC<ExerciseModalProps> = ({ isOpen, onClose, onSave,
|
||||
}}
|
||||
type="text"
|
||||
autoFocus
|
||||
autocapitalize="words"
|
||||
/>
|
||||
{error && (
|
||||
<p className="text-xs text-error mt-2 ml-3">{error}</p>
|
||||
|
||||
@@ -9,9 +9,10 @@ interface FilledInputProps {
|
||||
autoFocus?: boolean;
|
||||
step?: string;
|
||||
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">
|
||||
<label className="absolute top-2 left-4 text-[10px] font-medium text-on-surface-variant flex items-center gap-1">
|
||||
{icon} {label}
|
||||
@@ -25,6 +26,7 @@ const FilledInput: React.FC<FilledInputProps> = ({ label, value, onChange, type
|
||||
placeholder="0"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
autoCapitalize={autocapitalize}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user