2019-07-02 13:06:03 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-09-17 19:21:07 +08:00
|
|
|
@import './themes/vars.scss';
|
2019-07-02 13:06:03 +08:00
|
|
|
|
2019-10-12 14:23:40 +08:00
|
|
|
@mixin alert-type-mixin ($type) {
|
|
|
|
@include m($type + '-type') {
|
|
|
|
background-color: map-get($--alert-background-color, $type);
|
|
|
|
box-shadow: inset 0 0 0 1.2px map-get($--alert-border-color, $type);
|
2019-11-21 23:50:53 +08:00
|
|
|
text-align: left;
|
2019-10-12 14:23:40 +08:00
|
|
|
@include e(icon) {
|
|
|
|
@include b(icon) {
|
2019-10-24 18:04:31 +08:00
|
|
|
path {
|
|
|
|
fill: map-get($--alert-icon-color, $type);
|
|
|
|
}
|
2019-10-12 14:23:40 +08:00
|
|
|
}
|
2019-07-02 14:48:49 +08:00
|
|
|
}
|
2019-10-12 14:23:40 +08:00
|
|
|
@include b(alert-body) {
|
|
|
|
@include e(title) {
|
|
|
|
color: map-get($--alert-title-text-color, $type);
|
|
|
|
}
|
|
|
|
@include e(content) {
|
|
|
|
color: map-get($--alert-content-text-color, $type);
|
|
|
|
}
|
2019-07-29 15:45:42 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-12 14:23:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@include themes-mixin {
|
|
|
|
@include b(alert) {
|
|
|
|
@include once {
|
|
|
|
border-radius: 6px;
|
|
|
|
position: relative;
|
|
|
|
transition: background-color .3s $default-cubic-bezier;
|
|
|
|
@include e(icon) {
|
|
|
|
position: absolute;
|
2019-10-30 16:35:42 +08:00
|
|
|
left: 10px;
|
|
|
|
top: 11px;
|
2019-10-12 14:23:40 +08:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
width: 19px;
|
|
|
|
height: 19px;
|
|
|
|
@include b(icon) {
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
2019-10-30 16:35:42 +08:00
|
|
|
font-size: 22px;
|
2019-10-12 14:23:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(alert-body) {
|
2019-10-30 16:35:42 +08:00
|
|
|
padding: 12px 16px 16px 38px;
|
2019-10-12 14:23:40 +08:00
|
|
|
@include e(title) {
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 19px;
|
|
|
|
font-weight: 700;
|
2019-11-22 12:06:11 +08:00
|
|
|
& + {
|
|
|
|
@include e(content) {
|
|
|
|
margin-top: 9px;
|
|
|
|
}
|
|
|
|
}
|
2019-10-12 14:23:40 +08:00
|
|
|
}
|
|
|
|
@include e(content) {
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(no-icon) {
|
|
|
|
@include b(alert-body) {
|
|
|
|
padding-left: 19px;
|
|
|
|
}
|
|
|
|
}
|
2019-07-29 15:45:42 +08:00
|
|
|
}
|
2019-10-12 14:23:40 +08:00
|
|
|
@include alert-type-mixin('default');
|
|
|
|
@include alert-type-mixin('success');
|
|
|
|
@include alert-type-mixin('info');
|
|
|
|
@include alert-type-mixin('error');
|
|
|
|
@include alert-type-mixin('warning');
|
2019-07-29 15:45:42 +08:00
|
|
|
}
|
2019-07-02 13:06:03 +08:00
|
|
|
}
|