feat: add widgets schema validation (#3841)

This commit is contained in:
Bartholomew
2020-06-03 14:43:34 +01:00
committed by GitHub
parent 995739a85c
commit 2b46608f86
27 changed files with 304 additions and 25 deletions

View File

@ -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,
});

View 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' },
},
};