1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#6797: Improve toast styles

This commit is contained in:
checktheroads
2021-07-24 17:08:18 -07:00
parent 189e733f81
commit 0479d5a02a
18 changed files with 142 additions and 62 deletions

View File

@@ -34,16 +34,16 @@ export function createToast(
message: string,
extra?: string,
): Toast {
let iconName = 'bi-exclamation-triangle-fill';
let iconName = 'mdi-alert';
switch (level) {
case 'warning':
iconName = 'bi-exclamation-triangle-fill';
iconName = 'mdi-alert';
case 'success':
iconName = 'bi-check-circle-fill';
iconName = 'mdi-check-circle';
case 'info':
iconName = 'bi-info-circle-fill';
iconName = 'mdi-information';
case 'danger':
iconName = 'bi-exclamation-triangle-fill';
iconName = 'mdi-alert';
}
const container = document.createElement('div');
@@ -59,7 +59,7 @@ export function createToast(
header.setAttribute('class', `toast-header bg-${level} text-body`);
const icon = document.createElement('i');
icon.setAttribute('class', `bi ${iconName}`);
icon.setAttribute('class', `mdi ${iconName}`);
const titleElement = document.createElement('strong');
titleElement.setAttribute('class', 'me-auto ms-1');