@atlaskit/editor-plugin-card
Version:
Card plugin for @atlaskit/editor-core
21 lines • 875 B
JavaScript
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
import { blockCardNodeView } from './blockCard';
export var lazyBlockCardView = function lazyBlockCardView(props) {
var isPageSSRed = props.isPageSSRed;
if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
return blockCardNodeView(props);
}
return withLazyLoading({
nodeName: 'blockCard',
getNodeViewOptions: function getNodeViewOptions() {},
loader: function loader() {
var result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-block-card-item-nodeview" */
'./blockCard').then(function (_ref) {
var blockCardNodeView = _ref.blockCardNodeView;
return blockCardNodeView(props);
});
return result;
}
});
};