2023-12-25 17:21:39 +08:00
|
|
|
// Unlike other mdx elements, it does not receive the converted img tag,
|
|
|
|
|
// but all the attributes of the img tag.
|
|
|
|
|
const ImageWrapper = (props: JSX.IntrinsicElements["img"]) => {
|
|
|
|
|
return (
|
2024-08-14 12:57:22 +08:00
|
|
|
<div className="my-5 flex flex-col">
|
2023-12-25 17:21:39 +08:00
|
|
|
<img alt={props.alt} className="mx-auto my-0" src={props.src} />
|
2024-08-14 12:57:22 +08:00
|
|
|
<div className="mx-auto my-1 text-gray-500 text-sm dark:text-gray-300">{props.alt}</div>
|
2023-12-25 17:21:39 +08:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default ImageWrapper;
|