feat: add widgets schema validation (#3841)
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
import NetlifyCmsWidgetFile from 'netlify-cms-widget-file';
|
||||
import previewComponent from './ImagePreview';
|
||||
import schema from './schema';
|
||||
|
||||
const controlComponent = NetlifyCmsWidgetFile.withFileControl({ forImage: true });
|
||||
const Widget = (opts = {}) => ({
|
||||
name: 'image',
|
||||
controlComponent,
|
||||
previewComponent,
|
||||
schema,
|
||||
...opts,
|
||||
});
|
||||
|
||||
|
5
packages/netlify-cms-widget-image/src/schema.js
Normal file
5
packages/netlify-cms-widget-image/src/schema.js
Normal file
@ -0,0 +1,5 @@
|
||||
export default {
|
||||
properties: {
|
||||
allow_multiple: { type: 'boolean' },
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user