[英]How to write my own custom CSS using <AmplifyS3Image /> from "@aws-amplify/ui-react"?
const ImageFiles = ({className, imgKey}) => { const [imageLoading, setImageLoading] = useState(true);
const triggerOnLoad = (value)=> {
setImageLoading(value);
}
return (
<div className="image_files_container">
{imageLoading && (
<span className="image_loader_block">
<LoaderBig className="image_loader loader_msgList" loading={true} position="center" />
</span>
)}
<AmplifyS3Image
className={className}
imgKey={imgKey}
handleOnLoad={() => triggerOnLoad(false)}
/>
</div>
);
}
`amplify-s3-image {
--height: 300px;
--width: 90%;
}`
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.