aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/shared/severity-helper.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/shared/severity-helper.jsx')
-rw-r--r--server/sonar-web/src/main/js/components/shared/severity-helper.jsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/shared/severity-helper.jsx b/server/sonar-web/src/main/js/components/shared/severity-helper.jsx
new file mode 100644
index 00000000000..a0e931aca2f
--- /dev/null
+++ b/server/sonar-web/src/main/js/components/shared/severity-helper.jsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import SeverityIcon from './severity-icon';
+
+export default React.createClass({
+ render() {
+ if (!this.props.severity) {
+ return null;
+ }
+ return (
+ <span>
+ <SeverityIcon severity={this.props.severity}/>
+ &nbsp;
+ {window.t('severity', this.props.severity)}
+ </span>
+ );
+ }
+});