Skip to content

Commit

Permalink
fix(tab): remove diabled props
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Sep 13, 2024
1 parent a42874f commit 685c527
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lib/components/Tabs/TabsTrigger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { slide } from 'svelte/transition';
export let value: string;
export let disabled: boolean = false;
const tabsContext = getTabsContext();
const { activeTab } = tabsContext;
Expand All @@ -18,10 +17,8 @@
$: isActive = $activeTab === value;
function handleClick() {
if (!disabled) {
tabsContext.selectTab(value);
dispatch('click', { value });
}
tabsContext.selectTab(value);
dispatch('click', { value });
}
</script>

Expand All @@ -34,7 +31,6 @@
}
)}
on:click={handleClick}
{disabled}
>
<slot />
</button>
Expand Down

0 comments on commit 685c527

Please sign in to comment.