File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed
app/components/primer/open_project
previews/primer/open_project Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1
1
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
<%= breadcrumbs %>
3
- <%= back_button %>
4
- <%= title %>
3
+ <div class ="PageHeader-titleBar ">
4
+ <%= back_button %>
5
+ <%= title %>
6
+ <%= actions %>
7
+ </ div >
5
8
<%= description %>
6
- <%= actions %>
7
9
<% end %>
Original file line number Diff line number Diff line change 5
5
padding-bottom : var (--stack-padding-condensed );
6
6
margin-bottom : var (--stack-gap-normal );
7
7
border-bottom : var (--borderWidth-thin ) solid var (--borderColor-muted );
8
- flex-flow : row wrap;
9
- justify-content : flex-end; /* Keep actions right aligned. */
10
- align-items : baseline; /* Keep back button vertically aligned. */
8
+ flex-flow : column;
11
9
12
10
@media (max-width : 767.98 px ) {
13
11
border-bottom : 0 ;
14
12
}
15
13
}
16
14
15
+ .PageHeader-titleBar {
16
+ display : flex;
17
+ flex-flow : row;
18
+ justify-content : flex-end;
19
+ align-items : baseline; /* Keep back button vertically aligned. */
20
+ }
21
+
17
22
.PageHeader-title {
18
23
font-size : 24 px ;
19
24
font-weight : var (--base-text-weight-normal );
20
25
flex : 1 1 auto;
21
- order : 0 ;
22
26
}
23
27
24
28
.PageHeader-title--large {
30
34
font-size : var (--text-body-size-medium );
31
35
color : var (--fgColor-muted );
32
36
flex : 1 100 % ;
33
- order : 2 ;
34
37
}
35
38
36
39
/* Add 1 or 2 buttons to the right of the heading */
37
40
.PageHeader-actions {
38
41
margin : var (--base-size-4 ) 0 var (--base-size-4 ) var (--base-size-4 );
39
- align-self : center;
40
42
justify-content : flex-end;
41
- order : 1 ;
42
43
43
44
& + .PageHeader-description {
44
45
margin-top : var (--base-size-4 );
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def back_button_and_breadcrumbs
52
52
"test"
53
53
]
54
54
render ( Primer ::OpenProject ::PageHeader . new ) do |header |
55
- header . with_title ( ) { "Hello" }
55
+ header . with_title ( ) { "Hello this is a long title for testing " }
56
56
header . with_back_button ( href : "#" , 'aria-label' : "Back" )
57
57
header . with_breadcrumbs ( breadcrumb_items )
58
58
end
Original file line number Diff line number Diff line change 1
1
<%= render(Primer::OpenProject::PageHeader.new) do |component| %>
2
2
<% component.with_title(tag: :h1) do %>
3
- A title
3
+ Hello this is a long title for testing
4
4
<% end %>
5
5
<% component.with_description do %>
6
6
A description with actions
7
7
<% end %>
8
+ <% component.with_back_button(href: "#", 'aria-label': "Back") %>
8
9
<% component.with_actions do %>
9
10
<%= render(Primer::Alpha::ActionMenu.new) do |component| %>
10
11
<% component.with_show_button { "Menu" } %>
You can’t perform that action at this time.
0 commit comments