1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/public/js/components/ErrorMessages.ui.jsx
Ivar Conradi Østhus f82be4655a Added ErrorStore
2020-02-20 08:30:22 +01:00

37 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;