mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-27 17:19:39 +02:00
Match tooltip designs
This commit is contained in:
parent
c65b08efe5
commit
176eac82b3
1 changed files with 20 additions and 14 deletions
|
@ -248,22 +248,28 @@ export default class extends Controller {
|
||||||
${d3.timeFormat("%b %d, %Y")(data.date)}
|
${d3.timeFormat("%b %d, %Y")(data.date)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: flex; align-items: center; gap: 8px;">
|
<div style="display: flex; align-items: center; gap: 16px;">
|
||||||
<svg width="10" height="10">
|
<div style="display: flex; align-items: center; gap: 8px;">
|
||||||
<circle
|
<svg width="10" height="10">
|
||||||
cx="5"
|
<circle
|
||||||
cy="5"
|
cx="5"
|
||||||
r="4"
|
cy="5"
|
||||||
stroke="${this.#tooltipTrendColor(data)}"
|
r="4"
|
||||||
fill="transparent"
|
stroke="${this.#tooltipTrendColor(data)}"
|
||||||
stroke-width="1"></circle>
|
fill="transparent"
|
||||||
</svg>
|
stroke-width="1"></circle>
|
||||||
|
</svg>
|
||||||
|
|
||||||
${this.#tooltipValue(data)}
|
${this.#tooltipValue(data)}
|
||||||
|
</div>
|
||||||
|
|
||||||
<span style="color: ${this.#tooltipTrendColor(data)};">
|
${data.trend.value == 0 || data.trend.value.amount == 0 ? `
|
||||||
${this.#tooltipChange(data)} (${data.trend.percent}%)
|
<span style="width: 80px;"></span>
|
||||||
</span>
|
` : `
|
||||||
|
<span style="color: ${this.#tooltipTrendColor(data)};">
|
||||||
|
${this.#tooltipChange(data)} (${data.trend.percent}%)
|
||||||
|
</span>
|
||||||
|
`}
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue