New exercise name autofill. Log Set button animation.

This commit is contained in:
AG
2025-12-12 21:48:46 +02:00
parent c7f5c4048c
commit f169c7c4d3
8 changed files with 67 additions and 19 deletions

View File

@@ -75,18 +75,21 @@ const FilledInput: React.FC<FilledInputProps> = ({
<button
type="button"
onClick={handleClear}
className={`absolute top-1/2 -translate-y-1/2 p-2 text-on-surface-variant hover:text-on-surface rounded-full opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity ${rightElement ? 'right-12' : 'right-2'}`}
aria-label="Clear input"
className={`absolute top-1/2 -translate-y-1/2 p-2 text-on-surface-variant hover:text-on-surface rounded-full transition-opacity ${rightElement ? 'right-12' : 'right-2'}`}
tabIndex={-1}
>
<X size={16} />
</button>
)}
{rightElement && (
<div className="absolute right-2 top-1/2 -translate-y-1/2 z-10">
{rightElement}
</div>
)}
</div>
{
rightElement && (
<div className="absolute right-2 top-1/2 -translate-y-1/2 z-10">
{rightElement}
</div>
)
}
</div >
);
};