ui: Notice component (#9011)

Add simple Notice template only glimmer component
This commit is contained in:
John Cowen 2020-10-23 09:26:32 +01:00 committed by GitHub
parent 6d2ceb603e
commit e9c3eb1a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 6 deletions

View File

@ -0,0 +1 @@
{{yield}}

View File

@ -0,0 +1,5 @@
import Component from '@ember/component';
export default Component.extend({
tagName: '',
});

View File

@ -0,0 +1,9 @@
<div
class="notice {{@type}}"
...attributes
>
{{yield (hash
Header=(component 'anonymous' tagName="header")
Body=(component 'anonymous')
)}}
</div>

View File

@ -1,13 +1,24 @@
%notice { %notice {
position: relative; position: relative;
padding: 1em; padding: 0.8rem;
}
%notice header {
margin-bottom: 0.1rem;
}
%notice header > * {
margin-bottom: 0;
}
%notice p {
margin-bottom: 0.3rem;
line-height: 1.4;
} }
/* this is probably skin */ /* this is probably skin */
%notice { %notice {
padding-left: calc(1em + 32px); padding-left: calc(0.8rem + 1.4rem);
} }
%notice::before { %notice::before {
position: absolute; position: absolute;
left: 16px; top: 0.8rem;
top: 16px; left: 0.6rem;
font-size: 1rem;
} }

View File

@ -1,6 +1,10 @@
%notice { %notice {
border-radius: $decor-radius-100; border-radius: $decor-radius-100;
border-width: 1px; border: 1px solid;
}
%notice p:last-child a:only-child {
@extend %p3;
font-weight: $typo-weight-bold;
} }
%notice-success, %notice-success,
%notice-info, %notice-info,
@ -16,7 +20,12 @@
@extend %frame-green-500; @extend %frame-green-500;
} }
%notice-info { %notice-info {
@extend %frame-blue-500; border-color: $blue-100;
background-color: $gray-010;
color: $black;
}
%notice-info header * {
color: $blue-700;
} }
%notice-highlight { %notice-highlight {
@extend %frame-gray-800; @extend %frame-gray-800;

View File

@ -32,3 +32,6 @@
.notice.policy-management { .notice.policy-management {
@extend %notice-highlight; @extend %notice-highlight;
} }
.notice.crd::before {
@extend %with-logo-kubernetes-color-icon;
}