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

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

Image.defaultProps = {
  test: false
}

export default Image