2018-07-24 13:57:57 -04:00
|
|
|
import withFileControl from './withFileControl';
|
2019-03-16 15:44:29 -07:00
|
|
|
import previewComponent from './FilePreview';
|
2020-06-03 14:43:34 +01:00
|
|
|
import schema from './schema';
|
2018-07-24 13:57:57 -04:00
|
|
|
|
2019-03-16 15:44:29 -07:00
|
|
|
const controlComponent = withFileControl();
|
2021-02-08 20:01:21 +02:00
|
|
|
|
|
|
|
function Widget(opts = {}) {
|
|
|
|
return {
|
|
|
|
name: 'file',
|
|
|
|
controlComponent,
|
|
|
|
previewComponent,
|
|
|
|
schema,
|
|
|
|
...opts,
|
|
|
|
};
|
|
|
|
}
|
2019-03-27 13:47:28 -07:00
|
|
|
|
|
|
|
export const NetlifyCmsWidgetFile = { Widget, controlComponent, previewComponent, withFileControl };
|
|
|
|
export default NetlifyCmsWidgetFile;
|