Closed smelukov closed 3 years ago
Currently it's possible this way:
let popup = new discovery.view.Popup({
className: 'your-popup' // optional
});
discovery.nav.append({
name: 'your-name', // optional
onClick(el, data, context) {
popup.toggle(el, (popupEl) => discovery.view.render(popupEl, [
'text:"popup content goes here"'
], data, context);
}
});
Perhaps in the future it will be possible to define a popup in the config, which will eliminate the need to create a popup instance aside.
I want to create a burger-like button (show custom popup on click) Will be great if it will work out of the box