Skip to content

Commit a66ebdf

Browse files
pedrobernardinadecobot
andauthored
feat(Image): add srcSet prop (#1050)
Co-authored-by: decobot <capy@deco.cx>
1 parent 20905cc commit a66ebdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

website/components/Image.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ const Image = forwardRef<HTMLImageElement, Props>((props, ref) => {
166166
);
167167
}
168168

169-
const srcSet = getSrcSet(props.src, props.width, props.height, props.fit);
169+
const srcSet = props.srcSet ?? getSrcSet(props.src, props.width, props.height, props.fit);
170+
170171
const linkProps = srcSet && {
171172
imagesrcset: srcSet,
172173
imagesizes: props.sizes,

0 commit comments

Comments
 (0)