Merge pull request #21195 from overleaf/ds-adding-tooltips-trigger-bs5

BS5 Migration - Adding tooltips trigger for BS5 styling

GitOrigin-RevId: 0a446af5bc72f28ec8e2512fd4b248a6b78221a2
This commit is contained in:
Davinder Singh 2024-11-04 12:14:52 +00:00 committed by Copybot
parent eea27a36a4
commit 684731638a
4 changed files with 20 additions and 4 deletions

View file

@ -1,6 +1,4 @@
import 'bootstrap'
import './features/contact-form'
import './features/bookmarkable-tab/index'
$('[data-ol-lang-selector-tooltip]').tooltip({ trigger: 'hover' })
$('[data-toggle="tooltip"]').tooltip()
import './features/tooltip/index-bs3'

View file

@ -1,2 +1,3 @@
import 'bootstrap-5'
import './features/bookmarkable-tab/index-bs5'
import './features/tooltip/index-bs5'
import 'bootstrap-5'

View file

@ -0,0 +1,2 @@
$('[data-ol-lang-selector-tooltip]').tooltip({ trigger: 'hover' })
$('[data-toggle="tooltip"]').tooltip()

View file

@ -0,0 +1,15 @@
import { Tooltip } from 'bootstrap-5'
const footerLanguageElement = document.querySelector(
'[data-ol-lang-selector-tooltip]'
) as Element
const allTooltips = document.querySelectorAll('[data-bs-toggle="tooltip"]')
// eslint-disable-next-line no-unused-vars
const footLangTooltip = new Tooltip(footerLanguageElement)
allTooltips.forEach(element => {
// eslint-disable-next-line no-unused-vars
const tooltip = new Tooltip(element)
})