File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ const EnlargeImage = ( { src, alt, ariaLabel } ) => {
2+ const label = ariaLabel || alt ;
3+
4+ return (
5+ < div style = { { textAlign : 'center' , margin : '2rem 0' } } >
6+ < a href = { src } target = "_blank" >
7+ < img src = { src } alt = { label } style = { { maxWidth : '100%' , cursor : 'pointer' } } />
8+ </ a >
9+ </ div >
10+ ) ;
11+ } ;
12+
13+ export default EnlargeImage ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export { default as JsonTable } from './formatting/JsonTable';
1313// Image components
1414export { default as CaptionedImage } from './images/CaptionedImage' ;
1515export { default as ZoomingImage } from './images/ZoomingImage' ;
16+ export { default as EnlargeImage } from './images/EnlargeImage' ;
1617
1718// Information components
1819export { default as DiscoverableDisclosure } from './info/DiscoverableDisclosure' ;
You can’t perform that action at this time.
0 commit comments