Adds some padding around lightbox zooming
This commit is contained in:
parent
3eff5b73d2
commit
bcf1640587
2 changed files with 15 additions and 9 deletions
|
@ -13,6 +13,10 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
|
&--zoom {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__main-container {
|
&__main-container {
|
||||||
|
@ -75,7 +79,7 @@
|
||||||
&__shadow-container {
|
&__shadow-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 16px;
|
padding: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -107,22 +111,22 @@
|
||||||
&__shadow-container &__object {
|
&__shadow-container &__object {
|
||||||
max-height: 200%;
|
max-height: 200%;
|
||||||
max-width: 200%;
|
max-width: 200%;
|
||||||
padding: 0;
|
padding: 10%;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__object--container--zoom &__object {
|
||||||
|
max-height: 200%;
|
||||||
|
max-width: 200%;
|
||||||
|
padding: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
&__object--container--fill &__object {
|
&__object--container--fill &__object {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__object--container--zoom &__object {
|
|
||||||
max-height: 200%;
|
|
||||||
max-width: 200%;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__unsupported {
|
&__unsupported {
|
||||||
@include button-reset;
|
@include button-reset;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
|
@ -489,7 +489,9 @@ export function Lightbox({
|
||||||
return root
|
return root
|
||||||
? createPortal(
|
? createPortal(
|
||||||
<div
|
<div
|
||||||
className="Lightbox Lightbox__container"
|
className={classNames('Lightbox Lightbox__container', {
|
||||||
|
'Lightbox__container--zoom': zoomType === ZoomType.ZoomAndPan,
|
||||||
|
})}
|
||||||
onClick={(event: React.MouseEvent<HTMLDivElement>) => {
|
onClick={(event: React.MouseEvent<HTMLDivElement>) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue