mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
♻️ enhan: add prop blurDataURL to component ImgWithLink
:%s
This commit is contained in:
parent
208ddd146f
commit
df47b3a6f4
@ -6,16 +6,17 @@ import { BLUR_DATA_IMG } from 'src/utils/constanst.utils'
|
|||||||
export interface ImgWithLinkProps {
|
export interface ImgWithLinkProps {
|
||||||
src: string,
|
src: string,
|
||||||
alt?: string,
|
alt?: string,
|
||||||
|
blurDataURL?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ImgWithLink = ({ src, alt }: ImgWithLinkProps) => {
|
const ImgWithLink = ({ src, alt, blurDataURL = BLUR_DATA_IMG }: ImgWithLinkProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={s.imgWithLink}>
|
<div className={s.imgWithLink}>
|
||||||
<Image src={src} alt={alt}
|
<Image src={src} alt={alt}
|
||||||
layout="fill"
|
layout="fill"
|
||||||
className={s.imgWithLink}
|
className={s.imgWithLink}
|
||||||
placeholder="blur"
|
placeholder="blur"
|
||||||
blurDataURL={BLUR_DATA_IMG}
|
blurDataURL={blurDataURL}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user