Closed agcty closed 6 years ago
Additional info:
It looks like in the dist folder of github there is support for mdi:
var createIcon = function createIcon(options, toast) {
// add material icon if available
if (options.icon) {
var iel = document.createElement('i');
switch (options.iconPack) {
case 'fontawesome':
iel.classList.add('fa');
var faName = options.icon.name ? options.icon.name : options.icon;
if (faName.includes('fa-')) {
iel.classList.add(faName.trim());
} else {
iel.classList.add('fa-' + faName.trim());
}
break;
case 'mdi':
iel.classList.add('mdi');
var mdiName = options.icon.name ? options.icon.name : options.icon;
if (mdiName.includes('mdi-')) {
iel.classList.add(mdiName.trim());
} else {
iel.classList.add('mdi-' + mdiName.trim());
}
break;
default:
iel.classList.add('material-icons');
iel.textContent = options.icon.name ? options.icon.name : options.icon;
}
if (options.icon.after) {
iel.classList.add('after');
}
appendIcon(options, iel, toast);
}
};
However when installing through npm there isn't
it was actually not published to npm. now its available on the latest version. 🙌
I just tried using the mdi icon pack but this doesn't work unfortunately, when looking into the source of the most recent release there also is no trace of a case for iconPack: "mdi"