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

chore(nuxt): export icon names type #23

Closed neSpecc closed 1 year ago

neSpecc commented 1 year ago

In the Nuxt module <codex-icon> component requires name to be one of available icon names. It is checking internally, but outside of this module, there is no ability to access the available icon names list.

So I've exported a Union Type with available icon names.

image

Now Nuxt module users can access icon names:

import type { CodexIconName } from '@codexteam/nuxt-icons';

It allows to create wrappers around <codex-icon>. In my example it is the UiButton component:

image