1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-01 20:32:37 +00:00
trezor-wallet/src/utils/notification.js
2018-09-26 23:29:15 +02:00

31 lines
635 B
JavaScript

import colors from 'config/colors';
import icons from 'config/icons';
const getColor = (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 getIcon = type => icons[type.toUpperCase()];
export {
getColor,
getIcon,
};