-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can`t add Custom Icons into Vuetify config icons.sets #72
Comments
sets?: IconFontName | IconFontName[] | FontIconSet[]; |
Typescript show warnings if insert custom icons. That's why I'm asking an example... just to understand if I do something wrong |
If you're adding custom icons you need to add them using a Nuxt plugin, check https://vuetify-nuxt-module.netlify.app/guide/#nuxt-plugin-hooks (broken link to icons) and https://vuetify-nuxt-module.netlify.app/guide/icons/unocss-preset-icons.html#adding-a-new-vuetify-icon-set (the example is using UnoCSS Preset Icons but you can add your custom icons there) |
Using hooks worked to me: // ./plugins/vuetify-nuxt-module.js
import { defineNuxtPlugin } from '#imports'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook('vuetify:configuration', ({ vuetifyOptions }) => {
vuetifyOptions.icons.aliases.telegram = "svg:M9.78 18.65l.28-4.23l7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3L3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"
})
}) and then <v-icon icon="$telegram"/> I've icons configured as per docs: |
sets not iterable durung app building
Can you please provide an example of including custom icons in playground?
Thanks in advance
The text was updated successfully, but these errors were encountered: