Skip to content

Commit

Permalink
Docs(web): Add Tabs demo #DS-909
Browse files Browse the repository at this point in the history
- Tabs demo in web is now same as demo-react in web and web-twig
  • Loading branch information
pavelklibani committed Sep 19, 2023
1 parent a56fbdb commit fa3c5aa
Showing 1 changed file with 51 additions and 41 deletions.
92 changes: 51 additions & 41 deletions packages/web/src/scss/components/Tabs/index.html
Original file line number Diff line number Diff line change
@@ -1,48 +1,58 @@
{{#> layout/plain }}

<ul class="Tabs" role="tablist">
<li class="Tabs__item">
<button
class="Tabs__link is-selected"
role="tab"
type="button"
aria-selected="true"
id="pane1-tab"
data-spirit-toggle="tabs"
data-spirit-target="#pane1"
aria-controls="pane1"
>
Item 1
</button>
</li>
<li class="Tabs__item">
<button
class="Tabs__link"
role="tab"
type="button"
aria-selected="false"
id="pane2-tab"
data-spirit-toggle="tabs"
data-spirit-target="#pane2"
aria-controls="pane2"
>
Item 2
</button>
</li>
<li class="Tabs__item">
<a href="https://www.example.com" class="Tabs__link">Item Link</a>
</li>
<li class="Tabs__item d-none d-desktop-block">
<a href="https://www.example.com" class="Tabs__link">Item Link, Desktop Only</a>
</li>
</ul>
<section class="docs-Section">

<h2 class="docs-Heading">Default</h2>

<div class="docs-Stack docs-Stack--stretch">

<div id="pane1" class="TabsPane is-selected" role="tabpanel" aria-labelledby="pane1-tab">
Pane 1 content
</div>
<ul class="Tabs" role="tablist">
<li class="Tabs__item">
<button
class="Tabs__link is-selected"
role="tab"
type="button"
aria-selected="true"
id="pane1-tab"
data-spirit-toggle="tabs"
data-spirit-target="#pane1"
aria-controls="pane1"
>
Item 1
</button>
</li>
<li class="Tabs__item">
<button
class="Tabs__link"
role="tab"
type="button"
aria-selected="false"
id="pane2-tab"
data-spirit-toggle="tabs"
data-spirit-target="#pane2"
aria-controls="pane2"
>
Item 2
</button>
</li>
<li class="Tabs__item">
<a href="https://www.example.com" class="Tabs__link">Item link</a>
</li>
<li class="Tabs__item d-none d-desktop-block">
<a href="https://www.example.com" class="Tabs__link">Item link, desktop only</a>
</li>
</ul>

<div id="pane1" class="TabsPane is-selected" role="tabpanel" aria-labelledby="pane1-tab">
Pane 1 content
</div>

<div id="pane2" class="TabsPane" role="tabpanel" aria-labelledby="pane2-tab">
Pane 2 content
</div>

<div id="pane2" class="TabsPane" role="tabpanel" aria-labelledby="pane2-tab">
Pane 2 content
</div>

</section>

{{/layout/plain }}

0 comments on commit fa3c5aa

Please sign in to comment.