Skip to content

Commit

Permalink
AMP-30906: Resolve ndd dash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
brianbrix committed Oct 31, 2024
1 parent c931792 commit 3717a9a
Showing 1 changed file with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Tooltip } from 'react-tooltip';
import ReactTooltip, { Tooltip } from 'react-tooltip';
import PropTypes from 'prop-types';
import './SimpleLegend.css';

Expand All @@ -8,7 +8,6 @@ export default class SimpleLegend extends Component {
const {
data, getColor
} = this.props;
console.log(data, getColor);
let index = 0;
return (
<div className="simple-legend">
Expand All @@ -24,16 +23,27 @@ export default class SimpleLegend extends Component {
border: `2px solid ${getColor(d)}`,
backgroundColor: `${getColor(d)}`
}}
data-tip={d.name}
data-for={index.toString()}
data-tooltip-content={d.name}
data-tooltip-id={index.toString()}
data-tooltip-place="top"
/>
<span className="label">

>

</span>
<span className="label"
data-tooltip-content={d.name}
data-tooltip-id={index.toString()}
data-tooltip-place="top"
style={{cursor: 'pointer'}}
>
{d.name.substring(0, 10)}
<Tooltip
backgroundColor={getColor(d)}
id={index.toString()} />
place="top"
effect="float"
style={{
backgroundColor: `${getColor(d)}`
}}
id={index.toString()} />
</span>
</li>
);
Expand Down

0 comments on commit 3717a9a

Please sign in to comment.