feat(backstage.io): Allow to zoom images like Medium
This commit is contained in:
@@ -1094,3 +1094,8 @@ code {
|
||||
margin: 0 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
/* Zoomed images using the medium-zoom library should be on top of screen. */
|
||||
.medium-zoom-image {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Ref: https://github.com/francoischalifour/medium-zoom#options
|
||||
window.addEventListener(
|
||||
'load',
|
||||
() => {
|
||||
mediumZoom('[data-zoomable]', {
|
||||
margin: 20,
|
||||
background: '#000',
|
||||
});
|
||||
},
|
||||
false,
|
||||
);
|
||||
Reference in New Issue
Block a user