UNPKG

@atlaskit/editor-plugin-annotation

Version:

Annotation plugin for @atlaskit/editor-core

25 lines (24 loc) • 947 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBlockAnnotationViewClassname = exports.getAnnotationViewClassname = void 0; var _annotation = require("@atlaskit/editor-common/styles/annotation"); var getAnnotationViewClassname = exports.getAnnotationViewClassname = function getAnnotationViewClassname(isUnresolved, hasFocus, isHovered) { if (!isUnresolved) { return; } if (hasFocus) { return _annotation.AnnotationSharedClassNames.focus; } if (isHovered) { return _annotation.AnnotationSharedClassNames.hover; } return _annotation.AnnotationSharedClassNames.blur; }; var getBlockAnnotationViewClassname = exports.getBlockAnnotationViewClassname = function getBlockAnnotationViewClassname(isUnresolved, hasFocus) { if (!isUnresolved) { return; } return hasFocus ? _annotation.BlockAnnotationSharedClassNames.focus : _annotation.BlockAnnotationSharedClassNames.blur; };