open-nomad/ui/app/components/chart-primitives/h-annotations.hbs
Michael Lange 744f86eb65 Move complex annotation hbs logic into JS
As @backspace pointed out, we're processing a bunch of other stuff
anyway, so might as well process the active state there too where it's
more likely to be expected.
2021-03-09 17:19:52 -08:00

15 lines
571 B
Handlebars

<div data-test-annotations class="line-chart-annotations" style={{this.chartAnnotationsStyle}} ...attributes>
{{#each this.processed key=@key as |annotation|}}
<div data-test-annotation class="chart-horizontal-annotation" style={{annotation.style}}>
<button
type="button"
title={{annotation.a11yLabel}}
class="indicator {{if annotation.isActive "is-active"}}"
{{on "click" (fn this.selectAnnotation annotation.annotation)}}>
{{annotation.label}}
</button>
<div class="line" />
</div>
{{/each}}
</div>