feat(web, a11y): add labels! (#8354)

* feat(web, a11y): add labels!

* fix: move required prop to the top of the list
This commit is contained in:
Ben Basten
2024-03-29 12:48:07 +00:00
committed by GitHub
parent 6f677b4fae
commit fcc3b81745
20 changed files with 63 additions and 26 deletions

View File

@@ -22,6 +22,7 @@
export let interactive = false;
export let showTitle = true;
export let showProfileImage = true;
export let label: string | undefined = undefined;
let img: HTMLImageElement;
let showFallback = true;
@@ -61,7 +62,7 @@
$: colorClass = colorClasses[color];
$: sizeClass = sizeClasses[size];
$: title = `${user.name} (${user.email})`;
$: title = label ?? `${user.name} (${user.email})`;
$: interactiveClass = interactive
? 'border-2 border-immich-primary hover:border-immich-dark-primary dark:hover:border-immich-primary dark:border-immich-dark-primary transition-colors'
: '';