import React from 'react'; import PropTypes from 'prop-types'; import styled from 'react-emotion'; import { List } from 'immutable'; import { WidgetPreviewContainer } from 'netlify-cms-ui-default'; const StyledImage = styled(({ getAsset, value }) => ( ))` display: block; max-width: 100%; height: auto; `; const ImagePreviewContent = props => { const { value, getAsset } = 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;