Skip to content

Commit

Permalink
Adds color data option to tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lindeboom committed Jun 4, 2019
1 parent 9d8801f commit 2838e5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/tooltips/tooltipController.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export default class extends Controller {
if (!this.targets.has('hover')) {
this.element.setAttribute('data-target', `${this.type}.hover`)
}

if (this.data.get('color')) {
this.element.classList.add(this.data.get('color'))
}
}

disconnect() {
Expand Down

0 comments on commit 2838e5a

Please sign in to comment.