1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/packages/unleash-frontend/public/js/components/ErrorMessages.ui.jsx

35 lines
1.1 KiB
React
Raw Normal View History

2016-06-18 21:53:18 +02:00
'use strict';
const React = require('react');
2015-03-17 20:29:03 +01:00
2016-06-18 21:53:18 +02:00
const ErrorMessages = React.createClass({
2016-07-02 11:54:50 +02:00
render () {
2015-03-17 20:29:03 +01:00
if (!this.props.errors.length) {
return <div/>;
}
2016-06-18 21:53:18 +02:00
const errorNodes = this.props.errors.map((e, i) => <li key={e + i} className="largetext">{e}</li>);
2015-03-17 20:29:03 +01:00
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}
2016-08-25 13:24:14 +02:00
className="icon-kryss1 linkblock sharp" />
2015-03-17 20:29:03 +01:00
</div>
<div className="bd">
<ul>{errorNodes}</ul>
</div>
</div>
</div>
</div>
</div>
</div>
);
2016-06-18 21:55:46 +02:00
},
2015-03-17 20:29:03 +01:00
});
module.exports = ErrorMessages;