mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 04:14: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 {
|
||||
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>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user