chore: refine named exports (#2249)
This commit is contained in:
committed by
Shawn Erquhart
parent
4db497b496
commit
b4041d3971
@ -7,7 +7,7 @@ import { jsx, css, ClassNames } from '@emotion/core';
|
||||
import { List, Map } from 'immutable';
|
||||
import { partial } from 'lodash';
|
||||
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
||||
import { controlComponent as ObjectControl } from 'netlify-cms-widget-object';
|
||||
import NetlifyCmsWidgetObject from 'netlify-cms-widget-object';
|
||||
import {
|
||||
TYPES_KEY,
|
||||
getTypedFieldForValue,
|
||||
@ -20,6 +20,8 @@ function valueToString(value) {
|
||||
return value ? value.join(',').replace(/,([^\s]|$)/g, ', $1') : '';
|
||||
}
|
||||
|
||||
const ObjectControl = NetlifyCmsWidgetObject.controlComponent;
|
||||
|
||||
const ListItem = styled.div();
|
||||
|
||||
const SortableListItem = SortableElement(ListItem);
|
||||
|
@ -1,4 +1,13 @@
|
||||
import controlComponent from './ListControl';
|
||||
import { previewComponent } from 'netlify-cms-widget-object';
|
||||
export const NetlifyCmsWidgetList = { controlComponent, previewComponent };
|
||||
export { controlComponent, previewComponent };
|
||||
import NetlifyCmsWidgetObject from 'netlify-cms-widget-object';
|
||||
|
||||
const previewComponent = NetlifyCmsWidgetObject.previewComponent;
|
||||
const Widget = (opts = {}) => ({
|
||||
name: 'list',
|
||||
controlComponent,
|
||||
previewComponent,
|
||||
...opts,
|
||||
});
|
||||
|
||||
export const NetlifyCmsWidgetList = { Widget, controlComponent, previewComponent };
|
||||
export default NetlifyCmsWidgetList;
|
||||
|
Reference in New Issue
Block a user