diff --git a/package.json b/package.json index 8a18261..269936b 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "json2csv": "^4.5.4", "react": "^16.13.0", "react-dom": "^16.13.0", + "react-markdown": "^4.3.1", "react-router-dom": "^5.1.2", "react-scripts": "3.4.0" }, diff --git a/src/components/Finding.js b/src/components/Finding.js index 12ac146..71293d1 100644 --- a/src/components/Finding.js +++ b/src/components/Finding.js @@ -27,8 +27,7 @@ class Finding extends React.Component { return ( + className={status === 'failed' ? 'finding finding-fail' : 'finding'}>
diff --git a/src/components/Modal.js b/src/components/Modal.js index 5a430d8..a9a912c 100644 --- a/src/components/Modal.js +++ b/src/components/Modal.js @@ -2,6 +2,7 @@ import React from 'react' import Resources from './Resources' import Icon from './Icon' import Badge from './Badge' +const ReactMarkdown = require('react-markdown') class Modal extends React.Component { handleEscapeKey = event => { @@ -55,12 +56,10 @@ class Modal extends React.Component { return (
+ style={{ display: 'flex' }}>
+ onClick={this.props.handleClose}>
@@ -84,15 +83,13 @@ class Modal extends React.Component {
+ className='flex justify-end text-gray-500'> + className='modal-close'>
- {finding.description} +
@@ -128,7 +125,7 @@ class Modal extends React.Component { Remediation
- {finding.remediation} +
@@ -136,7 +133,7 @@ class Modal extends React.Component { Validation
- {finding.validation} +
@@ -151,15 +148,13 @@ class Modal extends React.Component { key={idx} className={`${ idx > 0 ? 'border-t border-gray-200' : '' - } pl-3 pr-4 py-3 flex items-center justify-between text-sm leading-5`} - > + } pl-3 pr-4 py-3 flex items-center justify-between text-sm leading-5`}>
+ stroke='currentColor'> + rel='noopener noreferrer'> {reference.ref} @@ -194,12 +188,10 @@ class Modal extends React.Component { return (
+ style={{ display: 'flex' }}>
+ onClick={this.props.handleClose}>
@@ -212,8 +204,7 @@ class Modal extends React.Component { className='h-6 w-6 text-white' fill='none' viewBox='0 0 24 24' - stroke='currentColor' - > + stroke='currentColor'>
+ className='flex justify-end text-gray-500'> + className='modal-close'>