@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
15 lines • 628 B
JavaScript
import React from 'react';
import { DragHandleDisabledIcon } from '../icons/DragHandleDisabledIcon';
import { DragHandleIcon } from '../icons/DragHandleIcon';
import { MinimisedHandleIcon } from '../icons/MinimisedHandle';
export const HandleIconComponent = props => {
const {
forceDefaultHandle,
isHandleHovered,
hasMergedCells
} = props;
if (isHandleHovered || forceDefaultHandle) {
return hasMergedCells ? /*#__PURE__*/React.createElement(DragHandleDisabledIcon, null) : /*#__PURE__*/React.createElement(DragHandleIcon, null);
}
return /*#__PURE__*/React.createElement(MinimisedHandleIcon, null);
};