17 lines
407 B
JavaScript
17 lines
407 B
JavaScript
import controlComponent from './CodeControl';
|
|
import previewComponent from './CodePreview';
|
|
import schema from './schema';
|
|
|
|
const Widget = (opts = {}) => ({
|
|
name: 'code',
|
|
controlComponent,
|
|
previewComponent,
|
|
schema,
|
|
allowMapValue: true,
|
|
codeMirrorConfig: {},
|
|
...opts,
|
|
});
|
|
|
|
export const NetlifyCmsWidgetCode = { Widget, controlComponent, previewComponent };
|
|
export default NetlifyCmsWidgetCode;
|