feat: add widgets schema validation (#3841)
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
import withMapControl from './withMapControl';
|
||||
import previewComponent from './MapPreview';
|
||||
import schema from './schema';
|
||||
|
||||
const controlComponent = withMapControl();
|
||||
const Widget = (opts = {}) => ({
|
||||
name: 'map',
|
||||
controlComponent,
|
||||
previewComponent,
|
||||
schema,
|
||||
...opts,
|
||||
});
|
||||
|
||||
|
6
packages/netlify-cms-widget-map/src/schema.js
Normal file
6
packages/netlify-cms-widget-map/src/schema.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
properties: {
|
||||
decimals: { type: 'integer' },
|
||||
type: { type: 'string', enum: ['Point', 'LineString', 'Polygon'] },
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user