react-native-picker / picker

Picker is a cross-platform UI component for selecting an item from a list of options.
MIT License
1.52k stars 289 forks source link

Can we add svg icon inside <Icon.Picker> ? #203

Open fabioplaka opened 3 years ago

fabioplaka commented 3 years ago

Hello, I have a question because from my research I haven't very clear. Can we add svg icons inside ?

I have submitted a piece of code:

         return (
              <Picker.Item
                label={<EnglishFlag height={25} width={25} /> + chosenLanguage.label}
                value={chosenLanguage.value}
                key={index}
              />
            );

I want to mention that I want to use svg icons not emojis. Thanks in advance

GuilhermeBorges3Ddev commented 3 years ago

I'm having the same issue... im still trying, if i get the solution i post here.

ggepenyan commented 2 years ago

Hi @fabioplaka @GuilhermeBorges3Ddev, Did you guys get any solution for this? Thank you. I'm struggling

deepanshu770 commented 2 years ago

Can you please add the icon and image support in <Picker.item/>. It would be very helpful.

marctorsoc commented 5 months ago

this one worked for me after some tuning: https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/usage