1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/unleash-server/public/js/components/ErrorMessages.jsx

21 lines
479 B
React
Raw Normal View History

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/>;
}
var errorNodes = this.props.errors.map(function(e) {
return (<li key={e}>{e}</li>);
});
return (
<div className="alert alert-danger" role="alert">
<ul>{errorNodes}</ul>
</div>
);
}
});
module.exports = ErrorMessages;