Closed mariohmol closed 3 years ago
Did you try executing the changes in the simulator? Because I don't get the Icon when I added it. Also, avatarComponent props can not be FC.
Also, the check condition on the item seems to be incorrect,
{enableAvatar && avatarComponent ? ( avatarComponent ) : ( <Avatar.Image size={avatarSize} style={styles.avatarView} source={avatarSource || defaultAvatar} /> )}
If I don't pass the enableAvatar prop, It should not set the avatar but the above condition will set the default image avatar as the item avatar when the enableAvatar prop is not given.
Yes.. now I realized.. the problem was the linter.. when I did commit he asked me to remove the parentesis
Ok, I did submit a change that fits the linter and the logic
avatarComponent
why it cant be FC? what it should be instead?
The avatar prop from the Chip expects the ReactNode, here I need the component with the signature of children. So FC isn't the correct prop to use.
Also, my lint scolding me for not using ReactNode 🤪
So what we should use as a type here? kind lost
ReactNode should work.
awesome.. thank you! pushed the change!
Hi, when u can please release a version with this.. would be awesome to incorporate the icons on the dropdown =)
I am planning to do it tomorrow(Saturday). Since I am little engaged with other work. Also, I need to do a quick test for this, all of this will take quite a lot of time.
You rock!!
Nowadays its possible to include an option avatar just with a Avatar.Image.
Would be great if the sourceAvatar could accept any component, so it can inject an Avatar.Icon or any other that he might to.
Based on request: #20
In sake of keeping the existing docs and code correct, I did create a new property
Thanks!