ui: Notice component (#9011)

Add simple Notice template only glimmer component
pull/9019/head
John Cowen 4 years ago committed by GitHub
parent 5e4de8b50a
commit 45554e4e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

@ -1,13 +1,24 @@
%notice {
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 */
%notice {
padding-left: calc(1em + 32px);
padding-left: calc(0.8rem + 1.4rem);
}
%notice::before {
position: absolute;
left: 16px;
top: 16px;
top: 0.8rem;
left: 0.6rem;
font-size: 1rem;
}

@ -1,6 +1,10 @@
%notice {
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-info,
@ -16,7 +20,12 @@
@extend %frame-green-500;
}
%notice-info {
@extend %frame-blue-500;
border-color: $blue-100;
background-color: $gray-010;
color: $black;
}
%notice-info header * {
color: $blue-700;
}
%notice-highlight {
@extend %frame-gray-800;

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

Loading…
Cancel
Save