2019-09-06 06:16:55 +10:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { WidgetPreviewContainer } from 'netlify-cms-ui-default';
|
|
|
|
|
2021-02-08 20:01:21 +02:00
|
|
|
function DatePreview({ value }) {
|
|
|
|
return <WidgetPreviewContainer>{value ? value.toString() : null}</WidgetPreviewContainer>;
|
|
|
|
}
|
2019-09-06 06:16:55 +10:00
|
|
|
|
|
|
|
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;
|