Skip to content

Commit

Permalink
Merge pull request appwrite#1542 from appwrite/fix-tabs-active-state
Browse files Browse the repository at this point in the history
Fix so the active state will be visible again
  • Loading branch information
ernstmul authored Dec 9, 2024
2 parents 04677af + 4cbff4f commit 0a2de9a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/markdoc/tags/Tabs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,22 @@
>
<ul class="tabs-list flex items-center gap-4" {...$list} use:list>
{#each $ctx.triggers.entries() as [id, title]}
<li class="tabs-item rounded-t-[0.625rem] hover:bg-white/4">
<li
class="tabs-item rounded-t-[0.625rem] hover:bg-white/4"
class:text-[var(--color-primary)]={$value === id}
>
<button
class="tabs-button cursor-pointer bg-clip-padding py-[0.625rem] px-1 font-light outline-none"
class:is-selected={$value === id}
{...$trigger(id)}
use:trigger>{title}</button
>
{#if $value === id}
<div
class="absolute mt-0.5 h-px overflow-hidden bg-[var(--color-primary)] px-1"
>
{title}
</div>
{/if}
</li>
{/each}
</ul>
Expand Down

0 comments on commit 0a2de9a

Please sign in to comment.