Description
Summary:
#536 introduced a specification for the className
and overlayClassName
props when passed as objects. I am interested in knowing whether or not all keys on the prop object need to be required. I would prefer it not be required to implement all three keys all the time (unless there is some a11y gain or the removal of some subtle bug that I'm missing).
Steps to reproduce:
-
Create a
<ReactModal>
and supply it anoverlayClassName
prop as an object, but exclude one of the three possible object keys (i.e.base
,afterOpen
,beforeClose
) -
Upon the modal render, you should see a prop warning in your console
Expected behavior:
No proptypes warning for missing object keys.
Link to example of issue:
I made a codepen that shows the warning, but I'm not sure it's necessary to show the point. It's obvious by the code that the proptype warning will occur.