Open ZoomableImage viewer when clicking on the image
This commit is contained in:
parent
00017e241e
commit
232841ef5e
2 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
import ErrorText from 'component/common/error-text';
|
import ErrorText from 'component/common/error-text';
|
||||||
|
import ZoomableImage from 'component/zoomableImage';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
source: string,
|
source: string,
|
||||||
|
@ -21,7 +22,7 @@ function ImageViewer(props: Props) {
|
||||||
)}
|
)}
|
||||||
{!loadingError && (
|
{!loadingError && (
|
||||||
<div className="file-viewer">
|
<div className="file-viewer">
|
||||||
<img src={source} onError={() => setLoadingError(true)} />
|
<ZoomableImage src={source} onError={() => setLoadingError(true)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
@ -726,3 +726,9 @@ video::-internal-media-controls-overlay-cast-button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.file-page__image {
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue