2014-10-30 18:25:38 +01:00
|
|
|
var React = require('react');
|
|
|
|
|
|
|
|
var ErrorMessages = React.createClass({
|
|
|
|
render: function() {
|
|
|
|
if (!this.props.errors.length) {
|
|
|
|
return <div/>;
|
|
|
|
}
|
|
|
|
|
2014-10-31 12:25:18 +01:00
|
|
|
var errorNodes = this.props.errors.map(function(e, i) {
|
|
|
|
return (<li key={e + i} className="largetext">{e}</li>);
|
2014-10-30 18:25:38 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
return (
|
2014-10-31 10:30:23 +01:00
|
|
|
<div className="container">
|
2014-11-03 13:56:23 +01:00
|
|
|
<div className="mod shadow mtm mrn">
|
2014-10-31 10:30:23 +01:00
|
|
|
<div className="inner bg-red-lt">
|
|
|
|
<div className="bd">
|
|
|
|
<div className="media centerify">
|
|
|
|
<div className="imgExt">
|
|
|
|
<a
|
|
|
|
onClick={this.props.onClearErrors}
|
|
|
|
className="icon-kryss1 linkblock sharp">
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div className="bd">
|
|
|
|
<ul>{errorNodes}</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-10-30 18:25:38 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-10-31 10:30:23 +01:00
|
|
|
module.exports = ErrorMessages;
|
|
|
|
|