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