nandorojo / zeego

Menus for React (Native) done right.
https://zeego.dev
MIT License
1.45k stars 42 forks source link

Add custom image support #7

Closed zienna closed 1 year ago

zienna commented 2 years ago

Hey there,

Thank you for the great library! I've been trying to implement a dropdown on both Android and iOS but it seems that the DropdownMenu.ItemIcon is just being ignored. I can only get it to work if I specify iosIconName or androidIconName but I can't use my custom svg or image.

nandorojo commented 2 years ago

hey, yeah that’s a constraint of the platforms. they only let you use system icons. there may be a way to add an item image in the future for iOS (unsure about android). the custom icon will render on web only for now.

zienna commented 2 years ago

Is there no other way to add a custom svg to it? I've seen other native apps having a non-system image next to the menu

nandorojo commented 2 years ago

i don’t know about SVG in particular, but images should be possible. when I have more time I’ll look into it. when I first tried it wasn’t supported by our ios library and I haven’t revisited since, but it may have gotten fixed.

nandorojo commented 1 year ago

I got this working, will be live in the next version:

image

It will come with the context menu at #10

nandorojo commented 1 year ago

Image support released in 0.5.0!