1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/public/js/components/ErrorMessages.jsx
Ivar Østhus 9a0a461edb Refactored all ``handleFoo` to `onFoo``
based on feedback from @jari
2020-02-20 08:30:14 +01:00

38 lines
1.2 KiB
JavaScript

var React = require('react');
var ErrorMessages = React.createClass({
render: function() {
if (!this.props.errors.length) {
return <div/>;
}
var errorNodes = this.props.errors.map(function(e, i) {
return (<li key={e + i} className="largetext">{e}</li>);
});
return (
<div className="container">
<div className="mod shadow mtm mrn">
<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>
</div>
);
}
});
module.exports = ErrorMessages;