shakee93 / vue-toasted

🖖 Responsive Touch Compatible Toast plugin for VueJS 2+
https://shakee93.github.io/vue-toasted/
MIT License
2.21k stars 194 forks source link

Add object config support to iconPack option #205

Closed BobbieGoede closed 11 months ago

BobbieGoede commented 3 years ago

Sorry for the duplicate PR, will remove the original one as it was based on a master branch.

This PR allows us to set iconPack to an object like so:

iconPack: {
    classes: ['material-icons-round'],
    textContent: true,
}

In this example config this sets the icon element classes to material-icons-round and uses the icon or icon name as the textContent { icon: 'info' } or { icon: { name: 'info' } } would both set the icon textContent to info.

This change makes it possible to use material icon variations but should also be useful for other iconPack implementation.

BobbieGoede commented 3 years ago

This PR would resolve my issue #200