UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

18 lines 740 B
import _extends from "@babel/runtime/helpers/extends"; import React from 'react'; import { useEditorContext } from '../ui/EditorContext'; export var WithEditorView = function WithEditorView(WrappedComponent) { var _WithFeatureFlags = function _WithFeatureFlags(props) { var _useEditorContext = useEditorContext(), editorActions = _useEditorContext.editorActions; return ( /*#__PURE__*/ // Ignored via go/ees005 // eslint-disable-next-line react/jsx-props-no-spreading React.createElement(WrappedComponent, _extends({}, props, { editorView: editorActions === null || editorActions === void 0 ? void 0 : editorActions._privateGetEditorView() })) ); }; return _WithFeatureFlags; };