wasp/web/blog/components/ImgWithCaption.js

20 lines
516 B
JavaScript
Raw Normal View History

import React from "react";
import useBaseUrl from "@docusaurus/useBaseUrl";
const ImgWithCaption = (props) => {
return (
<div>
2023-01-11 13:04:58 +03:00
<p align='center'>
<figure>
2023-01-11 13:04:58 +03:00
<img style={{ width: props.width }} alt={props.alt} src={useBaseUrl(props.source)} />
<figcaption class='image-caption' style={{ fontStyle: 'italic', opacity: 0.6, fontSize: '0.9rem' }}>
{props.caption}
</figcaption>
</figure>
</p>
</div>
);
};
export default ImgWithCaption;