Skip to content

Commit

Permalink
address pr comments, restyle
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Fish <mason@looky.cloud>
  • Loading branch information
Mason Fish committed Apr 3, 2020
1 parent 72705bb commit 2d45667
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
18 changes: 11 additions & 7 deletions src/css/_filter-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ $filter-tree-line-color: $gray-5;
height: 100%;
color: $white-1;

svg {
fill: $yellow;
height: 16px;
width: 16px;
margin-right: 12px;
.warning-body {
display: flex;
align-items: center;
svg {
fill: $yellow;
height: 11px;
width: 11px;
margin-right: 12px;
margin-bottom: 3px;
}
}

.filter-tree-parent {
display: flex;
flex-direction: row;
padding: 3px 0;
}

.remove-button {
position: absolute;
top: 5px;
right: 12px;
opacity: 0;
}
Expand Down
19 changes: 13 additions & 6 deletions src/css/_finding-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

.remove-button {
top: $space-xs;
top: $space-xxs;
right: 6px;
}
}
Expand All @@ -58,6 +58,7 @@
transition: background 150ms;
display: flex;
flex-direction: row;
align-items: center;

.program {
display: flex;
Expand Down Expand Up @@ -93,10 +94,16 @@
}
}

svg {
fill: $yellow;
height: 16px;
width: 16px;
margin-right: 12px;
.warning-body {
display: flex;
align-items: center;

svg {
fill: $yellow;
height: 11px;
width: 11px;
margin-right: 12px;
margin-bottom: 3px;
}
}
}
15 changes: 9 additions & 6 deletions src/js/components/FilterTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,19 @@ export default function FilterTree() {
function renderWarning() {
const findingSpace = get(node, ["data", "finding", "search", "space"], "")
const tip = `'${findingSpace}' space no longer exists`

const body = (
<div data-tip={tip} data-effect="solid" data-place="right">
if (includes(spaces, findingSpace)) return null

return (
<div
className="warning-body"
data-tip={tip}
data-effect="solid"
data-place="right"
>
<Warning />
<ReactTooltip />
</div>
)

if (!includes(spaces, findingSpace)) return body
return null
}

return (
Expand Down
14 changes: 9 additions & 5 deletions src/js/components/Investigation/FindingCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ export default React.memo<Props>(function FindingCard({finding}: Props) {
const findingSpace = get(finding, ["search", "space"], "")
const tip = `'${findingSpace}' space no longer exists`

const body = (
<div data-tip={tip} data-effect="solid" data-place="right">
if (includes(spaces, findingSpace)) return null

return (
<div
className="warning-body"
data-tip={tip}
data-effect="solid"
data-place="right"
>
<Warning />
<ReactTooltip />
</div>
)

if (!includes(spaces, findingSpace)) return body
return null
}

return (
Expand Down

0 comments on commit 2d45667

Please sign in to comment.