mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 13:26:07 +00:00
ui: Notice component (#9011)
Add simple Notice template only glimmer component
This commit is contained in:
parent
5e4de8b50a
commit
45554e4e9c
1
ui/packages/consul-ui/app/components/anonymous/index.hbs
Normal file
1
ui/packages/consul-ui/app/components/anonymous/index.hbs
Normal file
@ -0,0 +1 @@
|
||||
{{yield}}
|
5
ui/packages/consul-ui/app/components/anonymous/index.js
Normal file
5
ui/packages/consul-ui/app/components/anonymous/index.js
Normal file
@ -0,0 +1,5 @@
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend({
|
||||
tagName: '',
|
||||
});
|
9
ui/packages/consul-ui/app/components/notice/index.hbs
Normal file
9
ui/packages/consul-ui/app/components/notice/index.hbs
Normal file
@ -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…
x
Reference in New Issue
Block a user