From b6f64d9c7df7003eb9177af3ec1b8c52e7c2f30c Mon Sep 17 00:00:00 2001 From: Anselm Bradford Date: Wed, 19 Jun 2019 10:07:11 -0400 Subject: [PATCH] Fix linter issues --- src/ComplaintDetail.jsx | 7 ++++--- src/iconMap.jsx | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ComplaintDetail.jsx b/src/ComplaintDetail.jsx index 79ffc133b..69a8e8554 100644 --- a/src/ComplaintDetail.jsx +++ b/src/ComplaintDetail.jsx @@ -76,7 +76,7 @@ export class ComplaintDetail extends React.Component { return ( ) @@ -87,7 +87,7 @@ export class ComplaintDetail extends React.Component { return ( ) @@ -104,7 +104,8 @@ export class ComplaintDetail extends React.Component { { iconMap.getIcon( 'clock-round', - 'cf-icon-clock-round' + ( value.toLowerCase() === 'no' ? ' not-timely' : '' ) + 'cf-icon-clock-round' + + ( value.toLowerCase() === 'no' ? ' not-timely' : '' ) ) } { value } diff --git a/src/iconMap.jsx b/src/iconMap.jsx index 94219e7c4..c4e7889c7 100644 --- a/src/iconMap.jsx +++ b/src/iconMap.jsx @@ -18,6 +18,12 @@ const iconMap = { 'warning-round': } +/** + * Retrieve an SVG icon given it's name. + * @param {string} name - A cf-icon SVG canonical icon name. + * @param {string} customClass - A custom CSS class name to add to an icon. + * @returns {Object} An SVG icon markup. + */ function getIcon( name, customClass ) { let Icon = iconMap[name]; if ( typeof Icon === 'undefined' ) {