Skip to content

Commit

Permalink
preview app: add non-text tab trigger (#926)
Browse files Browse the repository at this point in the history
add non-text tab trigger to tabs preview
  • Loading branch information
Sebastian-ubs authored Jun 5, 2024
1 parent 175a6fb commit b3bc04c
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Basics() {
</div>
<div>
{/* eslint-disable-next-line no-alert */}
<ShadcnButton onClick={() => alert('Hello World')}>Plain Shadcn Button</ShadcnButton>
<ShadcnButton onClick={() => alert('Hello World')}>Shadcn Button</ShadcnButton>
</div>
</VerticalTabsContent>

Expand Down Expand Up @@ -115,26 +115,30 @@ function Basics() {
</VerticalTabsContent>

<VerticalTabsContent value="Tabs">
<Tabs>
<Tabs defaultValue="2-youShouldNotSeeThis">
<TabsList>
<TabsTrigger value="1">Tab 1</TabsTrigger>
<TabsTrigger value="2">Tab 2</TabsTrigger>
<TabsTrigger value="1">
<Button>non-text tab trigger</Button>
</TabsTrigger>
<TabsTrigger value="2-youShouldNotSeeThis">Tab 2</TabsTrigger>
<TabsTrigger value="3">Tab 3 - no linked content</TabsTrigger>
</TabsList>
<TabsContent value="1">Tab 1 Content</TabsContent>
<TabsContent value="2">Tab 2 Content</TabsContent>
<TabsContent value="2-youShouldNotSeeThis">Tab 2 Content</TabsContent>
{/* intentionally left out 3 to see the effect */}
</Tabs>
<hr className="pr-my-4" />
<VerticalTabs defaultValue="2">
<VerticalTabs defaultValue="2-youShouldNotSeeThis">
<VerticalTabsList>
<VerticalTabsTrigger value="1">Tab 1</VerticalTabsTrigger>
<VerticalTabsTrigger value="2">Tab 2</VerticalTabsTrigger>
<VerticalTabsTrigger value="1">
<Button>non-text tab trigger</Button>
</VerticalTabsTrigger>
<VerticalTabsTrigger value="2-youShouldNotSeeThis">Tab 2</VerticalTabsTrigger>
<VerticalTabsTrigger value="3">Tab 3</VerticalTabsTrigger>
<VerticalTabsTrigger value="4">Tab 4</VerticalTabsTrigger>
</VerticalTabsList>
<VerticalTabsContent value="1">Tab 1 Content</VerticalTabsContent>
<VerticalTabsContent value="2">Tab 2 Content</VerticalTabsContent>
<VerticalTabsContent value="2-youShouldNotSeeThis">Tab 2 Content</VerticalTabsContent>
<VerticalTabsContent value="3">Tab 3 Content</VerticalTabsContent>
<VerticalTabsContent value="4">Tab 4 Content</VerticalTabsContent>
</VerticalTabs>
Expand Down

0 comments on commit b3bc04c

Please sign in to comment.