16 lines
381 B
JavaScript
Raw Normal View History

2018-07-24 17:13:48 -04:00
import React from 'react';
import PropTypes from 'prop-types';
import { WidgetPreviewContainer } from 'netlify-cms-ui-default';
const ObjectPreview = ({ field }) => (
<WidgetPreviewContainer>
{(field && field.get('fields')) || field.get('field') || null}
</WidgetPreviewContainer>
2018-07-24 17:13:48 -04:00
);
ObjectPreview.propTypes = {
field: PropTypes.node,
};
export default ObjectPreview;