static-cms/src/components/Widgets/DateTimePreview.js

11 lines
275 B
JavaScript
Raw Normal View History

2016-09-11 23:07:48 +02:00
import React, { PropTypes } from 'react';
import previewStyle from './defaultPreviewStyle';
2016-09-11 23:07:48 +02:00
export default function DatePreview({ value }) {
return <div style={previewStyle}>{value ? value.toString() : null}</div>;
2016-09-11 23:07:48 +02:00
}
DatePreview.propTypes = {
2016-09-11 23:07:48 +02:00
value: PropTypes.node,
};