mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Explain the GeneralError component
This commit is contained in:
parent
f74a078afb
commit
97c4e9beb9
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,13 @@
|
|||
var Formsy = require('formsy-react');
|
||||
var React = require('react');
|
||||
|
||||
/*
|
||||
* A special formsy-react component that only outputs
|
||||
* error messages. If you want to display errors that
|
||||
* don't apply to a specific field, insert one of these,
|
||||
* give it a name, and apply your validation error to
|
||||
* the name of the GeneralError component.
|
||||
*/
|
||||
module.exports = Formsy.HOC(React.createClass({
|
||||
render: function () {
|
||||
if (!this.props.showError()) return null;
|
||||
|
|
Loading…
Reference in a new issue