Skip to content

Commit

Permalink
[Bug] fix comparison tooltip color and position (#1887)
Browse files Browse the repository at this point in the history
Signed-off-by: Shan He <heshan0131@gmail.com>

Co-authored-by: Shan He <heshan0131@gmail.com>
  • Loading branch information
jwasilgeo and heshan0131 committed Jul 28, 2022
1 parent 6c99bb0 commit 156f898
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/components/map/layer-hover-info.tsx
Expand Up @@ -43,9 +43,10 @@ export const StyledLayerName = styled(CenterFlexbox)`
const StyledTable = styled.table`
& .row__delta-value {
text-align: right;
margin-left: 6px;
&.positive {
color: ${props => props.theme.primaryBtnBgd};
color: ${props => props.theme.notificationColors.success};
}
&.negative {
Expand Down Expand Up @@ -80,18 +81,20 @@ const Row: React.FC<RowProps> = ({name, value, deltaValue, url}) => {
{value}
</a>
) : (
value
<>
<span>{value}</span>
{notNullorUndefined(deltaValue) ? (
<span
className={`row__delta-value ${
deltaValue.toString().charAt(0) === '+' ? 'positive' : 'negative'
}`}
>
{deltaValue}
</span>
) : null}
</>
)}
</td>
{notNullorUndefined(deltaValue) && (
<td
className={`row__delta-value ${
deltaValue.toString().charAt(0) === '+' ? 'positive' : 'negative'
}`}
>
{deltaValue}
</td>
)}
</tr>
);
};
Expand Down

0 comments on commit 156f898

Please sign in to comment.