mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
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:
parent
eea27a36a4
commit
684731638a
4 changed files with 20 additions and 4 deletions
|
@ -1,6 +1,4 @@
|
||||||
import 'bootstrap'
|
import 'bootstrap'
|
||||||
import './features/contact-form'
|
import './features/contact-form'
|
||||||
import './features/bookmarkable-tab/index'
|
import './features/bookmarkable-tab/index'
|
||||||
|
import './features/tooltip/index-bs3'
|
||||||
$('[data-ol-lang-selector-tooltip]').tooltip({ trigger: 'hover' })
|
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
import 'bootstrap-5'
|
|
||||||
import './features/bookmarkable-tab/index-bs5'
|
import './features/bookmarkable-tab/index-bs5'
|
||||||
|
import './features/tooltip/index-bs5'
|
||||||
|
import 'bootstrap-5'
|
||||||
|
|
2
services/web/frontend/js/features/tooltip/index-bs3.ts
Normal file
2
services/web/frontend/js/features/tooltip/index-bs3.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
$('[data-ol-lang-selector-tooltip]').tooltip({ trigger: 'hover' })
|
||||||
|
$('[data-toggle="tooltip"]').tooltip()
|
15
services/web/frontend/js/features/tooltip/index-bs5.ts
Normal file
15
services/web/frontend/js/features/tooltip/index-bs5.ts
Normal 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)
|
||||||
|
})
|
Loading…
Reference in a new issue