feat: add widgets schema validation (#3841)
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
import controlComponent from './NumberControl';
|
||||
import previewComponent from './NumberPreview';
|
||||
import schema from './schema';
|
||||
|
||||
const Widget = (opts = {}) => ({
|
||||
name: 'number',
|
||||
controlComponent,
|
||||
previewComponent,
|
||||
schema,
|
||||
...opts,
|
||||
});
|
||||
|
||||
|
8
packages/netlify-cms-widget-number/src/schema.js
Normal file
8
packages/netlify-cms-widget-number/src/schema.js
Normal file
@ -0,0 +1,8 @@
|
||||
export default {
|
||||
properties: {
|
||||
step: { type: 'integer' },
|
||||
valueType: { type: 'string' },
|
||||
min: { type: 'integer' },
|
||||
max: { type: 'integer' },
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user