Image component lazy behavior

This commit is contained in:
tmshv committed 2020-03-03 06:49:18 +03:00
1 parent 8f54454d32
commit 11ff066e6c
4 files changed
+79 -17

No files matched your search

+2 -2
View File
@@ -1,6 +1,7 @@
import './styles.css'
import cx from 'classnames'
import Link from 'next/link'
import { Image } from '../Image'
export type CardLayout = 'simple' | 'featured'
export type CardProps = {
@@ -19,8 +20,7 @@ export const Card: React.FC<CardProps> = props => (
<Link href={props.href}>
<a>
<div className={'card-image'}>
<img
className={cx({ opa: false })}
<Image
alt={props.img.alt}
src={props.img.src}
srcSet={props.img.srcSet}