Skip to content

Commit

Permalink
feat(tab): example tab's usage
Browse files Browse the repository at this point in the history
  • Loading branch information
macgeargear committed Sep 13, 2024
1 parent 2015db1 commit 6324e4b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/lib/components/Playground.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
import TabCapsuleItem from './TabCapsule.svelte';
import Modal from '$lib/components/Modal/Modal.svelte';
import { modalShow } from './Modal/store';
import TabsRoot from './Tabs/TabsRoot.svelte';
import TabsList from './Tabs/TabsList.svelte';
import TabsTrigger from './Tabs/TabsTrigger.svelte';
import TabsContent from './Tabs/TabsContent.svelte';
modalShow.set(false);
Expand Down Expand Up @@ -158,6 +162,26 @@
<Modal />
{/if}
</section>

<section class="section">
<TabsRoot defaultActiveTab="all">
<TabsList>
<TabsTrigger value="all">ทั้งหมด</TabsTrigger>
<TabsTrigger value="sgcu">อบจ.</TabsTrigger>
<TabsTrigger value="sccu">สภานิสิต</TabsTrigger>
</TabsList>

<TabsContent value="all">
<p>This is the all tab content.</p>
</TabsContent>
<TabsContent value="sgcu">
<p>This is the sgcu tab content.</p>
</TabsContent>
<TabsContent value="sccu">
<p>This is the sccu tab content.</p>
</TabsContent>
</TabsRoot>
</section>
</div>

<style>
Expand Down

0 comments on commit 6324e4b

Please sign in to comment.