meronex / meronex-icons

svg react icons of popular icon packs
Other
47 stars 2 forks source link

Better TypeScript support #1

Open smddzcy opened 4 years ago

smddzcy commented 4 years ago

First of all, thanks a lot for making this fork! I was about to make my own fork or switch to another library since react-icons was increasing our bundle size around 10mb. Our bundle size is greatly reduced after switching to @meronex/icons, but there's an issue with generated types.

This works:

import { IoIosArrowDropdown } from '@meronex/icons/io';

But this is not recognized by TypeScript:

import IoIosArrowDropdown from '@meronex/icons/io/IoIosArrowDropdown';
smddzcy commented 4 years ago

@aliogaili I'll try to make a PR when I have some free time. I just wanted to let you know in case you can take a look at it before I do.

aogaili commented 4 years ago

No worries, I'm glad it saved you some time, I don't use typescript but I'll be happy to merge your PR.

aogaili commented 4 years ago

Also once you submit the PR I'll make the preview copy configurable so you can adjust how you want the copy code to look like so it works for your project.

AliYar-Khan commented 7 months ago

haven't done the typescript part ?

I am receiving error on this line

import IoMdColorPalette from '@meronex/icons/ios/IosColorPalette'

aogaili commented 7 months ago

Not really, I don't use TS much.

But I can get it done if you want to get it started.

AliYar-Khan commented 6 months ago

@aogaili yes needed typescript is recommended and it should support that