feat: account switching

This commit is contained in:
Shibo Lyu 2024-10-16 03:21:26 +08:00
parent 2b47eeb146
commit e78279114a
6 changed files with 98 additions and 31 deletions

View file

@ -8,12 +8,15 @@
</script>
<svelte:element
this={href ? 'a' : 'div'}
this={href ? 'a' : 'button'}
{href}
class={tw(
'flex cursor-default items-center gap-2 px-4 py-3 font-medium text-sf-primary first:rounded-t-lg last:rounded-b-lg',
'flex w-full cursor-default items-center gap-2 px-4 py-3 font-medium text-sf-primary first:rounded-t-lg last:rounded-b-lg',
selected && 'bg-accent-500 text-white shadow-inner dark:bg-accent-900 dark:text-sf-primary'
)}
tabindex="0"
role="button"
on:click
>
{#if icon}
<Icon