♻️ enhan: add prop blurDataURL to component ImgWithLink

:%s
This commit is contained in:
lytrankieio123 2021-09-14 14:36:54 +07:00
parent 208ddd146f
commit df47b3a6f4

View File

@ -6,16 +6,17 @@ import { BLUR_DATA_IMG } from 'src/utils/constanst.utils'
export interface ImgWithLinkProps {
src: string,
alt?: string,
blurDataURL?: string,
}
const ImgWithLink = ({ src, alt }: ImgWithLinkProps) => {
const ImgWithLink = ({ src, alt, blurDataURL = BLUR_DATA_IMG }: ImgWithLinkProps) => {
return (
<div className={s.imgWithLink}>
<Image src={src} alt={alt}
layout="fill"
className={s.imgWithLink}
placeholder="blur"
blurDataURL={BLUR_DATA_IMG}
blurDataURL={blurDataURL}
/>
</div>
)