Improved mitigations UI by aligning and padding text, removing unused header

This commit is contained in:
VakarisZ 2020-03-26 12:59:23 +02:00
parent 57df099863
commit 2a8c510db5
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import React from 'react';
import ReactTable from 'react-table';
import marked from 'marked';
import '../../../styles/report/AttackReport.scss';
class MitigationsComponent extends React.Component {
@ -28,6 +29,7 @@ class MitigationsComponent extends React.Component {
static getMitigationDescriptions(name) {
return ([{
Header: name,
style: {'text-align': 'left'},
columns: [
{ id: 'description',
accessor: x => (<div dangerouslySetInnerHTML={{__html: x}} />),
@ -46,6 +48,7 @@ class MitigationsComponent extends React.Component {
data={this.state.descriptions}
showPagination={false}
defaultPageSize={this.state.descriptions.length}
className={'attack-mitigation'}
/> : ''}
</div>
);

View File

@ -80,3 +80,16 @@
padding-right:5px;
margin-bottom: 1px;
}
.attack-mitigation .rt-thead .rt-tr .rt-th {
text-align: left !important;
padding-left: 10px;
}
.attack-mitigation p {
padding-left: 7px;
}
.attack-mitigation .rt-table>.-header {
display: none !important;
}