aykutkardas / react-icomoon

It makes it very simple to use SVG icons in your React and React-Native projects.
https://svgps.app
MIT License
216 stars 22 forks source link

typescript support ☑ #13

Closed davidkhierl closed 3 years ago

davidkhierl commented 3 years ago

changed project to typescript and did my best to type the selection JSON file from icomoon.io, I quite did the similar approach in my existing project when this package still doesn't support typescript.

aykutkardas commented 3 years ago

Thanks for this work. I will evaluate this in more detail. I am waiting for a more suitable time for this. @davidkhierl

davidkhierl commented 3 years ago

Hmmm that’s odd seems like the selection.json got updated it have different properties now

On Tue, Sep 8, 2020 at 11:51 PM Aykut Kardaş notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/7966133/92521298-ac7ff480-f225-11ea-8d47-d41117a2c3bc.png

I generated an selection.json file and tried it. But I am getting some errors. What is this all about? @davidkhierl https://github.com/davidkhierl

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aykutkardas/React-IcoMoon/pull/13#issuecomment-689100563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7LZGOKGZSBDZVVNZKMFS3SE2DLTANCNFSM4QJOCIMA .

aykutkardas commented 3 years ago

Hmmm that’s odd seems like the selection.json got updated it have different properties now

I understand the cause of that problem, but there are a number of other shortcomings. Your development is almost available, but still a huge change. I'll merge this once I'm sure enough.

davidkhierl commented 3 years ago

I understand, some of the method won’t work anymore especially the getting of the current icon and path as the json file have different properties now. A quick workaround is make the iconSet props to a generic type or cast it directly

On Thu, Sep 10, 2020 at 11:06 AM Aykut Kardaş notifications@github.com wrote:

Hmmm that’s odd seems like the selection.json got updated it have different properties now

I understand the cause of that problem, but there are a number of other shortcomings. Your development is almost available, but still a huge change. I'll merge this once I'm sure enough.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aykutkardas/React-IcoMoon/pull/13#issuecomment-690035923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7LZGJHNFSQ2NTD3OKKJPTSFB3IXANCNFSM4QJOCIMA .

davidkhierl commented 3 years ago

updated the "iconSet" types, if this got pushed thru I'm planning to have it's own context api for the selection.json so we can utilize hooks for ease in the future, please let me know what you think