Skip to content

Commit 9c94ec2

Browse files
authored
Merge pull request #22 from opf/op/page-header-component
Add OpenProject status for custom components and generate PageHeader
2 parents 60fe845 + 8ccf60b commit 9c94ec2

29 files changed

Lines changed: 393 additions & 16 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@openproject/primer-view-components": minor
3+
---
4+
5+
- Add OpenProject status for custom components
6+
- Add PageHeader component
7+
8+
<!-- Changed components: Primer::OpenProject::PageHeader -->

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
env:
18-
FERRUM_PROCESS_TIMEOUT: 30
18+
FERRUM_PROCESS_TIMEOUT: 45
1919

2020
jobs:
2121
accessibility:
65.8 KB
Loading
65.8 KB
Loading
55.7 KB
Loading
55.7 KB
Loading
63 KB
Loading
63 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
2+
<%= title %>
3+
<%= description %>
4+
<%= actions %>
5+
<% end %>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* OP PageHeader */
2+
3+
.PageHeader {
4+
display: flex;
5+
padding-bottom: var(--stack-padding-condensed);
6+
margin-bottom: var(--stack-gap-normal);
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+
}
11+
12+
/* <h2> sized heading with normal font weight */
13+
.PageHeader-title {
14+
flex: 1 1 auto;
15+
order: 0;
16+
}
17+
18+
/* One-liner of supporting text */
19+
.PageHeader-description {
20+
font-size: var(--text-body-size-medium);
21+
color: var(--fgColor-muted);
22+
flex: 1 100%;
23+
order: 2;
24+
}
25+
26+
/* Add 1 or 2 buttons to the right of the heading */
27+
.PageHeader-actions {
28+
margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);
29+
align-self: center;
30+
justify-content: flex-end;
31+
order: 1;
32+
33+
& + .PageHeader-description {
34+
margin-top: var(--base-size-4);
35+
}
36+
}

0 commit comments

Comments
 (0)