question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Failed prop type: Invalid prop className supplied to Modal. Warning: Failed prop type: Invalid prop overlayClassName

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:9

github_iconTop GitHub Comments

1reaction
danphilibincommented, Jul 17, 2019

Leaving this solution here in case anyone has the same issue… in my case I had only included the base property in the className object. The error went away when I defined all three properties:

<Modal
  className={{
    base: 'modal', 
    afterOpen: 'modal-in',
    beforeClose: 'modal-out'
  }}
  overlayClassName={{
    base: 'modal-overlay', 
    afterOpen: 'modal-overlay-in',
    beforeClose: 'modal-overlay-out'
  }}
></Modal>
0reactions
fallenleavesguycommented, Aug 6, 2020

I think it is cause by empty css class rules, empty css will be remove by css-loader or something other, so you get empty string when you import styles in css modules

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript console.error() Method - W3Schools
The error() method writes an error message to the console. The console is useful for testing purposes. Syntax. console.error(message). Parameters ...
Read more >
console - Web APIs - MDN Web Docs
Chrome Edge Firefox console Full support. Chrome1. Toggle history Full support. Edge12. Toggle history Full s... assert Full support. Chrome1. Toggle history Full support. Edge12....
Read more >
Node.js console.error() Function - GeeksforGeeks
The console.error() function from console class of Node.js is used to display an error messages on the console. It prints to stderr with...
Read more >
Why is `.catch(err => console.error(err))` discouraged?
catch(err => console.error(err)) ? I've seen a lot of code that does this, why? What should I do instead?
Read more >
Console.Error Property (System) - Microsoft Learn
It redirects the standard input and output streams to files, but uses the Error property to write the standard error stream to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found