You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-wallet/src/utils/notification.js

50 lines
1.1 KiB

import { colors, icons } from 'trezor-ui-components';
const getPrimaryColor = type => {
let color;
switch (type) {
case 'info':
color = colors.INFO_PRIMARY;
break;
case 'error':
color = colors.ERROR_PRIMARY;
break;
case 'warning':
color = colors.WARNING_PRIMARY;
break;
case 'success':
color = colors.SUCCESS_PRIMARY;
break;
default:
color = null;
}
return color;
};
const getNotificationBgColor = type => {
let color;
switch (type) {
case 'info':
color = colors.INFO_LIGHT;
break;
case 'error':
color = colors.ERROR_LIGHT;
break;
case 'warning':
color = colors.WARNING_LIGHT;
break;
case 'success':
color = colors.SUCCESS_LIGHT;
break;
default:
color = null;
}
return color;
};
const getIcon = type => icons[type.toUpperCase()];
export { getPrimaryColor, getNotificationBgColor, getIcon };