leshak / svelte-icons-pack

MIT License
61 stars 3 forks source link

Named import #4

Closed mazipan closed 7 months ago

mazipan commented 2 years ago

For multiple icons usage, it's better to have named import.

So instead of:

import BsBox from "svelte-icons-pack/bs/BsBox";
import Bs123 from "svelte-icons-pack/bs/Bs123";
import BsActivity from "svelte-icons-pack/bs/BsActivity";

We can import it:

import { BsBox, Bs123, BsActivity } from "svelte-icons-pack/bs";
codenoid commented 10 months ago

hi

leshak commented 7 months ago

Try version 3.x https://www.npmjs.com/package/svelte-icons-pack

leshak commented 7 months ago
<script>
  import { Icon } from 'svelte-icons-pack';
  import { AiOutlineNodeExpand } from 'svelte-icons-pack/ai';
</script>

<Icon src={AiOutlineNodeExpand} />