Skip to content

Commit

Permalink
fixup! Feat(web-twig): Add spacing property to Tabs component #DS-1315
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Aug 2, 2024
1 parent 49b6234 commit 4236b19
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<TabList spacing="{{ { mobile: 'space-400', tablet: 'space-800', desktop: 'space-1200' } }}">
<TabList spacing="space-400">
<TabItem>
<TabLink isSelected id="pane-3-tab" data-spirit-toggle="tabs" targetPaneId="pane-3">
Item selected
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<TabList spacing="{{ { mobile: 'space-400', tablet: 'space-800', desktop: 'space-1200' } }}">
<TabItem>
<TabLink isSelected id="pane-3-tab" data-spirit-toggle="tabs" targetPaneId="pane-3">
Item selected
</TabLink>
</TabItem>
<TabItem>
<TabLink id="pane-4-tab" data-spirit-toggle="tabs" targetPaneId="pane-4">
Item
</TabLink>
</TabItem>
<TabItem>
<TabLink href="https://www.example.com">
Item link
</TabLink>
</TabItem>
</TabList>
<TabPane id="pane-3" isSelected label="pane-3-tab">
Pane 1
</TabPane>
<TabPane id="pane-4" label="pane-4-tab">
Pane 2
</TabPane>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</title>
</head>
<body>
<ul class="Tabs" style="--tabs-spacing: var(--spirit-space-400);--tabs-spacing-tablet: var(--spirit-space-800);--tabs-spacing-desktop: var(--spirit-space-1200);" role="tablist">
<ul class="Tabs" style="--tabs-spacing: var(--spirit-space-400);" role="tablist">
<li class="Tabs__item">
<button id="pane-3-tab" data-spirit-toggle="tabs" class="Tabs__link is-selected" aria-selected="true" aria-controls="pane-3" data-spirit-target="#pane-3" type="button">Item selected</button>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
</title>
</head>
<body>
<ul class="Tabs" style="--tabs-spacing: var(--spirit-space-400);--tabs-spacing-tablet: var(--spirit-space-800);--tabs-spacing-desktop: var(--spirit-space-1200);" role="tablist">
<li class="Tabs__item">
<button id="pane-3-tab" data-spirit-toggle="tabs" class="Tabs__link is-selected" aria-selected="true" aria-controls="pane-3" data-spirit-target="#pane-3" type="button">Item selected</button>
</li>

<li class="Tabs__item">
<button id="pane-4-tab" data-spirit-toggle="tabs" class="Tabs__link" aria-selected="false" aria-controls="pane-4" data-spirit-target="#pane-4" type="button">Item</button>
</li>

<li class="Tabs__item">
<a href="https://www.example.com" class="Tabs__link" aria-selected="false" role="tab">Item link</a>
</li>
</ul>

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

<div class="TabsPane" role="tabpanel" aria-labelledby="pane-4-tab" id="pane-4">
Pane 2
</div>
</body>
</html>

0 comments on commit 4236b19

Please sign in to comment.