Add Stimulus tooltip controller
This commit is contained in:
parent
96794029b3
commit
94f027f546
|
@ -0,0 +1,8 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
import { Tooltip } from 'bootstrap';
|
||||
|
||||
export default class extends Controller {
|
||||
connect(): void {
|
||||
new Tooltip(this.element);
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ import ShareController from "retrospring/controllers/share_controller";
|
|||
import ClipboardController from "retrospring/controllers/clipboard_controller";
|
||||
import QuestionboxFocusController from "retrospring/controllers/questionbox_focus_controller";
|
||||
import ReactionController from "retrospring/controllers/reaction_controller";
|
||||
import TooltipController from "retrospring/controllers/tooltip_controller";
|
||||
|
||||
/**
|
||||
* This module sets up Stimulus and our controllers
|
||||
|
@ -45,4 +46,5 @@ export default function (): void {
|
|||
window['Stimulus'].register('clipboard', ClipboardController);
|
||||
window['Stimulus'].register('questionbox-focus', QuestionboxFocusController);
|
||||
window['Stimulus'].register('reaction', ReactionController);
|
||||
window['Stimulus'].register('tooltip', TooltipController);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue