@insite/overlay--panels
v0.2.5
Published
Overlay with panels
Downloads
17
Readme
@insite/OverlayPanels.js
Construit un menu en overlay (via Overlay.js extends) et transforme les menus drupal qu'il contient en menu à panneaux coulissants à profondeur infinie
Installation
- Via npm :
yarn add @insite/overlay-panels
- @param {InnerHTML} content
- @param {Object} options
- id: 'overlay--menu'
- ariaLabel: 'Navigation'
- role: 'navigation'
- closeOnOverlayClick: false
- destination: 'body'
- buttonTag: 'button'
- buttonTexts: ['Ouvrir', 'Fermer']
- buttonDestination: '.region--header'
- closeButtonText: false
- transitionType: 'left-slide'
- viewportProportion: 100
- freezeScroll: true
- titlePanel : false
- titlePanelStatic : "Retour"
- panelsSelector: 'nav'
- backHome: false
Usage :
new OverlayPanels(settings.mobile_menu, {
destination: destination,
ariaLabel: 'Navigation principale',
id: 'overlay--menu',
transitionType: 'left-slide',
buttonDestination: '.region--header',
titlePanel: true,
closeOnOverlayClick: true,
viewportProportion: 60,
closeButtonText: "Fermer",
buttonTexts: ['Ouvrir le menu', 'Fermer le menu'],
titlePanel: true,
closeOnOverlayClick: true,
viewportProportion: 80,
closeButtonText: false,
buttonTexts: ['Ouvrir le menu', 'Fermer le menu']
});