import React from 'react'; import PropTypes from 'prop-types'; import styled from '@emotion/styled'; import { List } from 'immutable'; import { WidgetPreviewContainer } from 'netlify-cms-ui-default'; const StyledImage = styled(({ src }) => )` display: block; max-width: 100%; height: auto; `; const StyledImageAsset = ({ getAsset, value, field }) => { return ; }; const ImagePreviewContent = props => { const { value, getAsset, field } = props; if (Array.isArray(value) || List.isList(value)) { return value.map(val => ( )); } return ; }; const ImagePreview = props => { return ( {props.value ? : null} ); }; ImagePreview.propTypes = { getAsset: PropTypes.func.isRequired, value: PropTypes.node, }; export default ImagePreview;