2019-09-06 06:16:55 +10:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { WidgetPreviewContainer } from 'netlify-cms-ui-default';
|
|
|
|
|
|
|
|
const DatePreview = ({ value }) => (
|
|
|
|
<WidgetPreviewContainer>{value ? value.toString() : null}</WidgetPreviewContainer>
|
|
|
|
);
|
|
|
|
|
|
|
|
DatePreview.propTypes = {
|
2020-04-07 15:00:06 +03:00
|
|
|
value: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
2019-09-06 06:16:55 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
export default DatePreview;
|