feat: add widgets schema validation (#3841)
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
import controlComponent from './ListControl';
|
||||
import NetlifyCmsWidgetObject from 'netlify-cms-widget-object';
|
||||
import schema from './schema';
|
||||
|
||||
const previewComponent = NetlifyCmsWidgetObject.previewComponent;
|
||||
const Widget = (opts = {}) => ({
|
||||
name: 'list',
|
||||
controlComponent,
|
||||
previewComponent,
|
||||
schema,
|
||||
...opts,
|
||||
});
|
||||
|
||||
|
9
packages/netlify-cms-widget-list/src/schema.js
Normal file
9
packages/netlify-cms-widget-list/src/schema.js
Normal file
@ -0,0 +1,9 @@
|
||||
export default {
|
||||
properties: {
|
||||
allow_add: { type: 'boolean' },
|
||||
collapsed: { type: 'boolean' },
|
||||
summary: { type: 'string' },
|
||||
minimize_collapsed: { type: 'boolean' },
|
||||
label_singular: { type: 'string' },
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user