nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.99k stars 503 forks source link

Surround icons not updating with custom font #2447

Open stijns96 opened 3 days ago

stijns96 commented 3 days ago

Environment

Version

v2.18.7

Reproduction

-

Description

I'm using downloaded font awesome 6 svg's in my assets folder, but somehow I can't override the surround icons.

nuxt.config.ts

// @nuxt/icon (handled by @nuxt/ui)
icon: {
  customCollections: [
    {
      prefix: "fa-light",
      dir: "./assets/icons/font-awesome/light",
    },
    {
      prefix: "fa-brands",
      dir: "./assets/icons/font-awesome/brands",
    },
  ],
},

app.config.js

export default defineAppConfig({
  ui: {
    icons: {
      prev: "fa-light:arrow-left",
      next: "fa-light:arrow-right",
    },

    content: {
      surround: {
        icon: {
          prev: "fa-light:arrow-left",
          next: "fa-light:arrow-right",
        },
      },
    },
  },
},

Adding it to icons.prev and icons.next is not working at all.

Overriding it in content.surround.icon.... is working (class-wise), but simply not adding the icons..

Additional context

No response

Logs

No response

stijns96 commented 3 days ago

Same actually also goes for the copy icons of the CodeBlock