From 41c73eebaac0f46c3c6d897fb89175bd3388bcf1 Mon Sep 17 00:00:00 2001 From: Yuriy Demidov Date: Wed, 20 Sep 2023 13:21:45 +0300 Subject: [PATCH] fix: import lodash methods directly (#126) --- src/extensions/behavior/Placeholder/index.ts | 2 +- src/extensions/markdown/index.ts | 2 +- src/toolbar/ToolbarButton.tsx | 2 +- src/toolbar/ToolbarListButton.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extensions/behavior/Placeholder/index.ts b/src/extensions/behavior/Placeholder/index.ts index d60c6da7..22614c31 100644 --- a/src/extensions/behavior/Placeholder/index.ts +++ b/src/extensions/behavior/Placeholder/index.ts @@ -1,6 +1,6 @@ import type {Node, Schema} from 'prosemirror-model'; import {EditorState, Plugin, PluginKey, Transaction} from 'prosemirror-state'; -import {isEqual} from 'lodash'; +import isEqual from 'lodash/isEqual'; import {Decoration, DecorationSet} from 'prosemirror-view'; import {findChildren, findParentNodeClosestToPos} from 'prosemirror-utils'; import {cn} from '../../../classname'; diff --git a/src/extensions/markdown/index.ts b/src/extensions/markdown/index.ts index 8f291374..7398b657 100644 --- a/src/extensions/markdown/index.ts +++ b/src/extensions/markdown/index.ts @@ -1,4 +1,4 @@ -import {isFunction} from 'lodash'; +import isFunction from 'lodash/isFunction'; import type {Extension, ExtensionAuto} from '../../core'; import {Bold, BoldOptions} from './Bold'; diff --git a/src/toolbar/ToolbarButton.tsx b/src/toolbar/ToolbarButton.tsx index 9ea8a777..3e887df5 100644 --- a/src/toolbar/ToolbarButton.tsx +++ b/src/toolbar/ToolbarButton.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {isFunction} from 'lodash'; +import isFunction from 'lodash/isFunction'; import {ActionTooltip, Button, Icon} from '@gravity-ui/uikit'; import {cn} from '../classname'; import {ToolbarTooltipDelay} from './const'; diff --git a/src/toolbar/ToolbarListButton.tsx b/src/toolbar/ToolbarListButton.tsx index 03953637..a2651b9c 100644 --- a/src/toolbar/ToolbarListButton.tsx +++ b/src/toolbar/ToolbarListButton.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {isFunction} from 'lodash'; +import isFunction from 'lodash/isFunction'; import {Button, Hotkey, Icon, Menu, Popup, Tooltip} from '@gravity-ui/uikit'; import {HelpPopover} from '@gravity-ui/components'; import {ChevronDown} from '@gravity-ui/icons';