Closed seanmturley closed 5 months ago
The problem here was that the prop types for icon React elements were expected to be PropTypes.elementType
, when they needed to be PropTypes.element
. It's not completely clear what the former is for, but that solved the problem.
The same issue that affected the icon
prop also affected optionIcons
, with the latter also failing to check for an object containing React elements. This is also fixed.
Description
"Warning: Failed prop type: Invalid prop
icon
of typeobject
supplied toToggleSwitch
, expected a single ReactElement type."