react-native-ui-kitten icon indicating copy to clipboard operation
react-native-ui-kitten copied to clipboard

Button Unsupported configuration

Open fatihozkir opened this issue 3 years ago • 4 comments

💬 Question

UI Kitten and Eva version

Package Version
@eva-design/eva ^2.1.1
@ui-kitten/components ^5.1.2

Hello, Good day.

We are pretty new on the usage of UI Kitten, upon our custom component implementations we are having the warning for UIKitten button. Both in our props and UIKitten button's props there are no variants and states properties. But the error says to check one of the following prop values.

The code block is here: image

image

Looking forward to hearing from you.

fatihozkir avatar Jul 22 '22 10:07 fatihozkir

@fatihozkir Can props.appearance be undefined ? If so, you might want to provide a default value: appearance={props.appearance || "filled"}

celinedupuis avatar Jul 27 '22 12:07 celinedupuis

What happens when you spread all the attributes?

Example:

function QiButton({...props}) {
  return <Button {...props}>;
}

https://davidl.fr/pattern#spread-attributes

flexbox avatar Jul 28 '22 15:07 flexbox

@celinedupuis props appearance has the default value which is 'filled', nevertheless still the issue is being persisted.

fatihozkir avatar Aug 01 '22 08:08 fatihozkir

What happens when you spread all the attributes?

Example:

function QiButton({...props}) {
  return <Button {...props}>;
}

https://davidl.fr/pattern#spread-attributes

I am going to give it a try, thanks a lot

fatihozkir avatar Aug 01 '22 08:08 fatihozkir

@fatihozkir There might be 2 cases: either passed appearance/status/size are undefined or non-null values, which are not described in mappings. From the code snippet it's not clear where default value values for that props are defined, and what exact values are passed to button. Can you check which case do you have? And maybe tell which values are passed to Button props?

greenfrvr avatar Oct 31 '22 10:10 greenfrvr

Closing the problem because of the long response time, there is a chance that the problem has already been fixed, if you have any questions, happy to help, you can reopen the ticket for this, with respect the team UI Kitten

bataevvlad avatar May 30 '23 08:05 bataevvlad