Added JSHint and JSXHint for linting the code.
This commit is contained in:
19
assets/js/components/Alert.jsx
Normal file
19
assets/js/components/Alert.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
var React = require('react');
|
||||
var classNames = require('classnames');
|
||||
|
||||
var Alert = React.createClass({
|
||||
|
||||
propTypes: {
|
||||
type: React.PropTypes.string.isRequired,
|
||||
text: React.PropTypes.string.isRequired
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return(
|
||||
<div className={classNames('alert', 'alert-' + this.props.type)}>{this.props.text}</div>
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
module.exports = Alert;
|
||||
Reference in New Issue
Block a user