Easy peasy MaterialDesignIcons usage in Vue components.
Require this package into your project:
yarn add materialdesign-vue --save-dev
# or, using npm
npm install materialdesign-vue --save-dev
Include the vue-mdi.min.js
file into your project, import it and register
the Mdi component:
<script src="https://github.com/chteuchteu/MaterialDesignIcons-Vue/blob/master/dist/vue-mdi.min.js"></script>
Vue.use(Mdi);
<template>
<mdi
:mdi="mdiCheck"
:size="16"
class="fill-success"
/>
</template>
<script>
export default {
// ...
computed: {
mdiCheck: () => require('@mdi/svg/svg/check.svg'),
}
}
</script>