@rocketsofawesome/mirage
Version:
[Live Demo of the Pattern Library](https://rocketsofawesome.github.io/mirage/)
22 lines (21 loc) • 491 B
JavaScript
import React from 'react'
import PropTypes from 'prop-types'
import { InlineImage } from 'SRC'
const ContentfulImage = ({className, fields: {description, file: {url}}}) => {
return (
<InlineImage
className={className}
alt={description}
src={url} />
)
}
ContentfulImage.propTypes = {
fields: PropTypes.shape({
description: PropTypes.string,
file: PropTypes.shape({
url: PropTypes.string
})
})
}
/** @component */
export default ContentfulImage