-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Feat(web-twig): Add spacing property to Tabs component #DS-1315
- Loading branch information
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.../web-twig/src/Resources/components/Tabs/__tests__/__fixtures__/tabsWithCustomSpacing.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ources/components/Tabs/__tests__/__fixtures__/tabsWithCustomSpacingForEachBreakpoint.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...onents/Tabs/__tests__/__snapshots__/tabsWithCustomSpacingForEachBreakpoint.twig.snap.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |