| 70 | } |
| 71 | |
| 72 | export function Image({src, expandable, ...otherProps}) { |
| 73 | let publicUrl = React.useContext(ImageContext); |
| 74 | let baseUrl = publicUrl.replace(/\/$/, ''); |
| 75 | let url = baseUrl + '/' + path.basename(src); |
| 76 | |
| 77 | let className = clsx(docStyles.video, expandable && docStyles.expandableImage); |
| 78 | |
| 79 | return ( |
| 80 | // eslint-disable-next-line jsx-a11y/alt-text |
| 81 | <img |
| 82 | src={url} |
| 83 | className={className} |
| 84 | data-img={expandable ? 'expand-img' : null} |
| 85 | {...otherProps} |
| 86 | /> |
| 87 | ); |
| 88 | } |
| 89 | |
| 90 | export function Video({src, ...otherProps}) { |
| 91 | let publicUrl = React.useContext(ImageContext); |