cpsoinos / nuxt-svgo

SVGO loader for Nuxt
MIT License
139 stars 10 forks source link

Unnecessary margin-bottom in nuxt-icon #311

Open ProAndSmiDev opened 3 weeks ago

ProAndSmiDev commented 3 weeks ago

Hello everyone, I have a question for you: can you remove the margin-bottom: 0.125em; in the class .nuxt-icon? In the current version, this property interferes with icon rendering, as they unnecessarily rise higher than necessary. I can reset it or change it with !important styles for global using and without in each icon, but it would be better if I didn't have to do it. Thank you so much for your attention, I am waiting for your feedback

File: src/runtime/components/nuxt-icon.vue

jd1378 commented 3 weeks ago

Hi

You can define your own component using the customComponent option:

// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  modules: ['nuxt-svgo'],
  svgo: {
    customComponent: 'YourComponent',
  },
})

simply copy it, modify it to suit your needs, and use it

I hope this helps