redbadger/website-honestly

View on GitHub
site/pages/our-work/slices/shared/image/index.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
// @flow

import * as React from 'react';
import styles from './styles.css';

type Props = {
  src: string,
  alt: string,
  layout?: 'base' | 'attachToBottom',
};

export default function Image({ src, alt, layout = 'base' }: Props) {
  return (
    <div className={styles[layout]}>
      <img src={src} alt={alt} />
    </div>
  );
}