2019-03-27 13:47:28 -07:00
|
|
|
import NetlifyCmsWidgetFile from 'netlify-cms-widget-file';
|
2019-03-16 15:44:29 -07:00
|
|
|
import previewComponent from './ImagePreview';
|
2019-03-27 13:47:28 -07:00
|
|
|
|
|
|
|
const controlComponent = NetlifyCmsWidgetFile.withFileControl({ forImage: true });
|
|
|
|
const Widget = (opts = {}) => ({
|
|
|
|
name: 'image',
|
|
|
|
controlComponent,
|
|
|
|
...opts,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const NetlifyCmsWidgetImage = { Widget, controlComponent, previewComponent };
|
|
|
|
export default NetlifyCmsWidgetImage;
|