react-notification-system icon indicating copy to clipboard operation
react-notification-system copied to clipboard

Props `children` no Longer Renders

Open BigPrimeNumbers opened this issue 7 years ago • 0 comments

The prop children used to work as expected, and would render controls that were passed via it. Now it appears to no longer render anything. This code used to display two buttons at the bottom of the notification:

const controls =
     <div>
         <button type="button" onClick={doSomething}>YES</button>
         <button type="button" >NO</button>
     </div>
const notification = {
     dismissible: true,
     title: 'some title',
     message: "some msg",
     level: 'warning',
     autoDismiss: 0,
     children: controls,
 }

Now no buttons render unless I use the action prop. For reference, I'm using React 15.6.2

BigPrimeNumbers avatar Sep 17 '18 22:09 BigPrimeNumbers