Open afk-mario opened 2 years ago
Hi @afk-mario! I think this is an issue with your code. The component expects arrow
to be a boolean or node, and you are passing it a function. It should work correctly if you pass it the icon directly:
<ListboxButton
className={`${classNamePrefix}-button`}
arrow={<CgChevronDown />}
/>
Here's a sandbox of a working example: https://codesandbox.io/s/charming-brahmagupta-emibiv?file=/src/index.js
The component expects arrow to be a boolean or node,
You are right! I missed it I think I did because the error is
Warning: Failed prop type: Invalid prop `arrow` supplied to `ListboxButton`, expected one of type [boolean].
instead of
[Warning: Failed prop type: Invalid prop `arrow` supplied to `ListboxButton`, expected one of type [boolean, node].
🐛 Bug report
Current Behavior
Getting the following error:
**Warning: Failed prop type: Invalid prop `arrow` supplied to `ListboxButton`, expected one of type [boolean].**
And this is how I'm using the Listbox
Expected behavior
Listbox Button accepts a boolean or node
Reproducible example
https://codesandbox.io/s/hidden-rain-mbovdk?file=%2Fsrc%2Findex.js