Closed haydncomley closed 1 year ago
Hey @haydncomley, First of all, thanks for this PR, this makes a lot of great changes to the project. Just one thing that I'd like to change here is TypeScript. We should just provide type definitions for the apps that use TypeScript, but the package itself should not depend on TypeScript.
Totally agree, this should be the case as the dist
folder is included and includes the built output as .js
with mapping files included - then within the package.json
it notes where to pull X from for the different dev environments.
If I've got this confused or wrong though it's your package so feel free to make any changes or additions!
@haydncomley That part I understood, no issues there, the problem is the dependencies, you've added typescript in "dependencies" which would mean they would end up in all the bundles, regardless if the project is using typescript or not, it should be in "devDependencies".
Oh yes you're right! Great catch - when I get home I can push some updates for you 🫡
I've just updated the deps for you.
I also changed back the setter to setIcon
rather than changeIcon
(not sure why I changed this in the first place)
Hello! First off, love the package and I use it within a couple of my projects, however there are some issues throughout. Rather than keep the additions I made to myself I've tried to put them all in a nice PR for you and others to potentially consume. I've gone through and fixed the issues others have mentioned with Android crashing. At the same time I've added types and created a helper function for resetting the icon to the default.
While I've gone through the code, I thought it was worth also updating the
Readme.md
to be a but more helpful for those that aren't sure where to begin on the graphics side of this. I've included examples, and screenshots to explain visually what happens at each step. I have also remove theexample
project itself as I thought this wasn't needed and the instructions alone should be good for a user to follow.Hope this PR looks like a positive change for the repo as it hasn't been touched in a while and is the main one that comes up when people google
react native change icon
(obviously)!