diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-01-29 17:55:12 +0100 |
---|---|---|
committer | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-02-07 11:32:38 +0100 |
commit | 8441bef88cbfc8fa87ff216088f4852b511910dd (patch) | |
tree | 6cf15f07d04ef5f1a5adec1170a96752e7ad9ddf /server/sonar-web/src/main/js/components/ui | |
parent | 8b3584e7ad88c5b97207101d6f6ed3f64e86060d (diff) | |
download | sonarqube-8441bef88cbfc8fa87ff216088f4852b511910dd.tar.gz sonarqube-8441bef88cbfc8fa87ff216088f4852b511910dd.zip |
SONAR-10319 Display Analysis Scope on rules detail page (#2995)
* SONAR-10319 Display Analysis Scope on rules detail page
* fix icons alignment
Diffstat (limited to 'server/sonar-web/src/main/js/components/ui')
-rw-r--r-- | server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx index 38367963058..5cf34fe37e3 100644 --- a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx +++ b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx @@ -25,26 +25,27 @@ import CodeSmellIcon from '../icons-components/CodeSmellIcon'; interface Props { className?: string; query: string; + size?: number; } -export default function IssueTypeIcon(props: Props) { +export default function IssueTypeIcon({ className, query, size }: Props) { let icon; - switch (props.query.toLowerCase()) { + switch (query.toLowerCase()) { case 'bug': case 'bugs': case 'new_bugs': - icon = <BugIcon />; + icon = <BugIcon size={size} />; break; case 'vulnerability': case 'vulnerabilities': case 'new_vulnerabilities': - icon = <VulnerabilityIcon />; + icon = <VulnerabilityIcon size={size} />; break; case 'code_smell': case 'code_smells': case 'new_code_smells': - icon = <CodeSmellIcon />; + icon = <CodeSmellIcon size={size} />; break; } @@ -52,5 +53,5 @@ export default function IssueTypeIcon(props: Props) { return null; } - return props.className ? <span className={props.className}>{icon}</span> : icon; + return className ? <span className={className}>{icon}</span> : icon; } |