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 }) => (
|
2018-08-24 17:39:35 -04:00
|
|
|
<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;
|