1+ import { Meta } from "@storybook/react" ;
2+ import { Tab , TabContent , TabList , TabTrigger } from "./Tab" ;
3+ import { Button } from "../button/Button" ;
4+ import { Text } from "../text/Text" ;
5+ import React from "react" ;
6+ import { IconHome , IconBuilding } from "@tabler/icons-react" ;
7+
8+ export default {
9+ title : "Tab" ,
10+ } as Meta
11+
12+ export const TabExample = ( ) => {
13+ return < Tab orientation = { "horizontal" } defaultValue = { "overview" } >
14+ < TabList >
15+ < TabTrigger value = { "overview" } >
16+ < Button variant = { "none" } >
17+ < IconHome size = { 16 } />
18+ Overview
19+ </ Button >
20+ </ TabTrigger >
21+ < TabTrigger value = { "organizations" } >
22+ < Button variant = { "none" } >
23+ < IconBuilding size = { 16 } />
24+ Organizations
25+ </ Button >
26+ </ TabTrigger >
27+ </ TabList >
28+ < TabContent value = { "overview" } >
29+ < Text > Overview</ Text >
30+ </ TabContent >
31+ < TabContent value = { "organizations" } >
32+ < Text > Organizations</ Text >
33+ </ TabContent >
34+ </ Tab >
35+ }
36+
37+ export const TabExampleVertical = ( ) => {
38+ return < Tab orientation = { "vertical" } defaultValue = { "overview" } >
39+ < TabList >
40+ < TabTrigger value = { "overview" } >
41+ < Button variant = { "none" } >
42+ < IconHome size = { 16 } />
43+ Overview
44+ </ Button >
45+ </ TabTrigger >
46+ < TabTrigger value = { "organizations" } >
47+ < Button variant = { "none" } >
48+ < IconBuilding size = { 16 } />
49+ Organizations
50+ </ Button >
51+ </ TabTrigger >
52+ </ TabList >
53+ < TabContent w = { "200px" } value = { "overview" } >
54+ < Text > Overview</ Text >
55+ </ TabContent >
56+ < TabContent w = { "200px" } value = { "organizations" } >
57+ < Text > Organizations</ Text >
58+ </ TabContent >
59+ </ Tab >
60+ }
0 commit comments