mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
[CL-18] toast component and service (#6490)
Update toast styles and new service to CL.
This commit is contained in:
@@ -43,8 +43,6 @@
|
||||
@import "~bootstrap/scss/_utilities";
|
||||
@import "~bootstrap/scss/_print";
|
||||
|
||||
@import "~ngx-toastr/toastr";
|
||||
|
||||
@import "./base";
|
||||
@import "./buttons";
|
||||
@import "./callouts";
|
||||
@@ -54,5 +52,4 @@
|
||||
@import "./pages";
|
||||
@import "./plugins";
|
||||
@import "./tables";
|
||||
@import "./toasts";
|
||||
@import "./vault-filters";
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
.toast-container {
|
||||
.toast-close-button {
|
||||
font-size: 18px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.ngx-toastr {
|
||||
align-items: center;
|
||||
background-image: none !important;
|
||||
border-radius: $border-radius;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
|
||||
display: flex;
|
||||
padding: 15px;
|
||||
|
||||
.toast-close-button {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.icon i::before {
|
||||
float: left;
|
||||
font-style: normal;
|
||||
font-family: $icomoon-font-family;
|
||||
font-size: 25px;
|
||||
line-height: 20px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.toast-message {
|
||||
p {
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.toast-danger,
|
||||
&.toast-error {
|
||||
@include themify($themes) {
|
||||
background-color: themed("danger");
|
||||
}
|
||||
|
||||
&,
|
||||
&:before,
|
||||
& .toast-close-button {
|
||||
@include themify($themes) {
|
||||
color: themed("textDangerColor") !important;
|
||||
}
|
||||
}
|
||||
|
||||
.icon i::before {
|
||||
content: map_get($icons, "error");
|
||||
}
|
||||
}
|
||||
|
||||
&.toast-warning {
|
||||
@include themify($themes) {
|
||||
background-color: themed("warning");
|
||||
}
|
||||
|
||||
&,
|
||||
&:before,
|
||||
& .toast-close-button {
|
||||
@include themify($themes) {
|
||||
color: themed("textWarningColor") !important;
|
||||
}
|
||||
}
|
||||
|
||||
.icon i::before {
|
||||
content: map_get($icons, "exclamation-triangle");
|
||||
}
|
||||
}
|
||||
|
||||
&.toast-info {
|
||||
@include themify($themes) {
|
||||
background-color: themed("info");
|
||||
}
|
||||
|
||||
&,
|
||||
&:before,
|
||||
& .toast-close-button {
|
||||
@include themify($themes) {
|
||||
color: themed("textInfoColor") !important;
|
||||
}
|
||||
}
|
||||
|
||||
.icon i:before {
|
||||
content: map_get($icons, "info-circle");
|
||||
}
|
||||
}
|
||||
|
||||
&.toast-success {
|
||||
@include themify($themes) {
|
||||
background-color: themed("success");
|
||||
}
|
||||
|
||||
&,
|
||||
&:before,
|
||||
& .toast-close-button {
|
||||
@include themify($themes) {
|
||||
color: themed("textSuccessColor") !important;
|
||||
}
|
||||
}
|
||||
|
||||
.icon i:before {
|
||||
content: map_get($icons, "check");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user