Skip to content

Commit 45554e4

Browse files
authored
ui: Notice component (hashicorp#9011)
Add simple Notice template only glimmer component
1 parent 5e4de8b commit 45554e4

File tree

6 files changed

+44
-6
lines changed

6 files changed

+44
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{yield}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Component from '@ember/component';
2+
3+
export default Component.extend({
4+
tagName: '',
5+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div
2+
class="notice {{@type}}"
3+
...attributes
4+
>
5+
{{yield (hash
6+
Header=(component 'anonymous' tagName="header")
7+
Body=(component 'anonymous')
8+
)}}
9+
</div>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
%notice {
22
position: relative;
3-
padding: 1em;
3+
padding: 0.8rem;
4+
}
5+
%notice header {
6+
margin-bottom: 0.1rem;
7+
}
8+
%notice header > * {
9+
margin-bottom: 0;
10+
}
11+
%notice p {
12+
margin-bottom: 0.3rem;
13+
line-height: 1.4;
414
}
515
/* this is probably skin */
616
%notice {
7-
padding-left: calc(1em + 32px);
17+
padding-left: calc(0.8rem + 1.4rem);
818
}
919
%notice::before {
1020
position: absolute;
11-
left: 16px;
12-
top: 16px;
21+
top: 0.8rem;
22+
left: 0.6rem;
23+
font-size: 1rem;
1324
}

ui/packages/consul-ui/app/styles/base/components/notice/skin.scss

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
%notice {
22
border-radius: $decor-radius-100;
3-
border-width: 1px;
3+
border: 1px solid;
4+
}
5+
%notice p:last-child a:only-child {
6+
@extend %p3;
7+
font-weight: $typo-weight-bold;
48
}
59
%notice-success,
610
%notice-info,
@@ -16,7 +20,12 @@
1620
@extend %frame-green-500;
1721
}
1822
%notice-info {
19-
@extend %frame-blue-500;
23+
border-color: $blue-100;
24+
background-color: $gray-010;
25+
color: $black;
26+
}
27+
%notice-info header * {
28+
color: $blue-700;
2029
}
2130
%notice-highlight {
2231
@extend %frame-gray-800;

ui/packages/consul-ui/app/styles/components/notice.scss

+3
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@
3232
.notice.policy-management {
3333
@extend %notice-highlight;
3434
}
35+
.notice.crd::before {
36+
@extend %with-logo-kubernetes-color-icon;
37+
}

0 commit comments

Comments
 (0)