2017-11-11 22:00:22 +01:00

21 lines
359 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
function Image({ src, alt, presentation }) {
return (
<img
src={src}
alt={alt}
role={presentation && 'presentation'}
/>
);
}
Image.propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
presentation: PropTypes.bool,
};
export default Image;