react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Icon prop error.

Open cngjsskaisme opened this issue 7 years ago • 10 comments

Ask your Question

As it says in documentation, I tried to add button with icon which is 'dots-vertical'. And it says that is invalid though the document says that icon is in the supported list.

And I'm using expo so AFAIK there's no need of extra configuration.

The error message was : Invalid prop name of value 'dots-vertical' supplied to 'icon'.

The code was like below : <Button icon='dots-vertical' size={20} onPress={() => {this._openMenu}} />

Please help with this problem. Many thanks!

cngjsskaisme avatar Aug 28 '19 11:08 cngjsskaisme

@cngjsskaisme you could try more-vert for the icon prop instead

chuabingquan avatar Aug 28 '19 13:08 chuabingquan

@cngjsskaisme you could try more-vert for the icon prop instead

Thanks for your comment but that didn't help... But anyways I appreciate it :)

cngjsskaisme avatar Aug 28 '19 14:08 cngjsskaisme

@cngjsskaisme Which version of Paper are you using? 2.x or 3.x (master)

jayu avatar Aug 29 '19 06:08 jayu

@jaysbytes I have followed the 'Getting started' page instructions, so I think it's 3.x.

cngjsskaisme avatar Aug 30 '19 06:08 cngjsskaisme

You should check the version in package.json. Check this example https://snack.expo.io/@jaysbytes/jealous-carrot In your case dots-vertical (3.x) or more-vert (2.x) should work. If both don't work I cannot help without more complex reproduction

jayu avatar Aug 30 '19 08:08 jayu

I'm experiencing the very same issue. My environment:

  • React Native without Expo
  • React Native Paper V2.16.0

Icon names on my project seem to point to Google Material Icons, but the icon list available on the docs point to Material Community Icons.

If Material Community Icons works only on (3.x), which is currently on alpha (according to the releases page), shouldn't the docs show the list of icons available for (2.x)?

rodrigo98rm avatar Aug 30 '19 22:08 rodrigo98rm

I can confirm the following from @rodrigo98rm

Icon names on my project seem to point to Google Material Icons, but the icon list available on the docs point to Material Community Icons.

If Material Community Icons works only on (3.x), which is currently on alpha (according to the releases page), shouldn't the docs show the list of icons available for (2.x)?

Also, I am a little confused with the docs. Are they entirely 3.x ? Or are they 2.x with some (probably misplaced) 3.x parts ? For the record, I lost about one hour trying icons, checking linking of my react-native-vector-icon lib, checking my ttf files and so on.

Arnaud-J avatar Sep 05 '19 14:09 Arnaud-J

This issue is far from closed

vivek25constants avatar Sep 10 '19 06:09 vivek25constants

I'm using 3.6.0 and Google Material Icons doesn't seem to work either. I've posted the available name list here (extracted from their warning message, have no idea where it came from). Hope they update the docs soon.

lydongcanh avatar Feb 27 '20 17:02 lydongcanh

You should check the version in package.json. Check this example https://snack.expo.io/@jaysbytes/jealous-carrot In your case dots-vertical (3.x) or more-vert (2.x) should work. If both don't work I cannot help without more complex reproduction

dots-vertical worked with me.

dennis-gonzales avatar May 16 '21 09:05 dennis-gonzales