Skip to content

Commit 8600b3b

Browse files
authored
upgrade @github/tab-container-element@latest (primer#2624)
1 parent 46a5f6d commit 8600b3b

File tree

25 files changed

+102
-150
lines changed

25 files changed

+102
-150
lines changed

.changeset/fifty-experts-melt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/view-components": minor
3+
---
4+
5+
Upgrade @github/tab-container, using shadowdom

app/components/primer/alpha/overlay.pcss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ anchored-position.not-anchored::backdrop, dialog::backdrop {
3030
flex-direction: column;
3131
overflow-y: hidden;
3232

33-
& > .tabnav {
33+
&::part(tablist-wrapper) {
3434
margin: var(--base-size-8) 0;
3535
padding: 0 var(--base-size-8);
3636
}
@@ -39,4 +39,4 @@ anchored-position.not-anchored::backdrop, dialog::backdrop {
3939
.Overlay-tabPanel {
4040
overflow: hidden;
4141
display: flex;
42-
}
42+
}

app/components/primer/alpha/tab_nav.pcss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
overflow: auto;
1414
}
1515

16+
.tabnav::part(tablist-wrapper) {
17+
margin-bottom: var(--stack-gap-normal);
18+
border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);
19+
}
20+
1621
.tabnav-tab {
1722
display: inline-block;
1823
flex-shrink: 0;
@@ -66,6 +71,11 @@
6671
}
6772
}
6873

74+
tab-container .tabnav-tab {
75+
margin-bottom: -1px;
76+
}
77+
78+
6979
/* Tabnav extras
7080
**
7181
** Tabnav extras are non-tab elements that sit in the tabnav. Usually they're

app/components/primer/alpha/tab_panels.html.erb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
<%= tab_container_wrapper(with_panel: true, **@wrapper_arguments) do %>
2-
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
3-
<%= extra if @align == :left %>
4-
<%= render Primer::BaseComponent.new(**@body_arguments) do %>
5-
<% tabs.each do |tab| %>
6-
<%= tab %>
7-
<% end %>
8-
<% end %>
9-
<%= extra if @align == :right %>
1+
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
2+
<%= extra if @align == :left %>
3+
<% tabs.each do |tab| %>
4+
<%= tab %>
105
<% end %>
6+
<%= extra if @align == :right %>
117
<% tabs.each do |tab| %>
128
<%= tab.panel %>
139
<% end %>

0 commit comments

Comments
 (0)