codex-team / icons

Dozens of cute svg icons made with love by CodeX for your projects. No dependencies required. Free to use and share.
MIT License
39 stars 15 forks source link

feat(nuxt): the nuxt module #21

Closed neSpecc closed 1 year ago

neSpecc commented 1 year ago

I've implemented a module for the Nuxt 3.

This module adds the component /runtime/components/icon.vue under name <codex-icon> to the Nuxt app. This component uses CodeX Icons pack.

Features

  1. 💖 Dynamic loading
  2. 💝 Coloring
  3. 💞 HMR (reloading on update in dev mode)

Installation

  1. Get the package
yarn add @codexteam/nuxt-icons
  1. Add module to the nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@codexteam/nuxt-icons'
  ]
})

Usage

Use the codex-icon component with the name property with should be one of the list.

<codex-icon name="IconHeart" />