summaryrefslogtreecommitdiff
path: root/src2/components/elements/Image.js
blob: 60e249b99467c669e065458ec549d8cd7b7bd88c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { LazyLoadImage } from "react-lazy-load-image-component"
import "react-lazy-load-image-component/src/effects/opacity.css"

const Image = ({ ...props }) => {
  return (
    <LazyLoadImage
      {...props}
      effect="opacity"
      src={props.src || '/images/noimage.jpeg'}
      alt={props.src ? props.alt : 'Image Not Found - Indoteknik'}
    />
  )
}

Image.defaultProps = LazyLoadImage.defaultProps

export default Image