diff --git a/web/app/components/datasets/formatted-text/flavours/edit-slice.tsx b/web/app/components/datasets/formatted-text/flavours/edit-slice.tsx index 3ae95ec531..04ebd16f6c 100644 --- a/web/app/components/datasets/formatted-text/flavours/edit-slice.tsx +++ b/web/app/components/datasets/formatted-text/flavours/edit-slice.tsx @@ -3,8 +3,6 @@ import type { FC, ReactNode } from 'react' import type { SliceProps } from './type' import { autoUpdate, flip, FloatingFocusManager, offset, shift, useDismiss, useFloating, useHover, useInteractions, useRole } from '@floating-ui/react' import { RiDeleteBinLine } from '@remixicon/react' -// @ts-expect-error no types available -import lineClamp from 'line-clamp' import { useState } from 'react' import ActionButton, { ActionButtonState } from '@/app/components/base/action-button' import { cn } from '@/utils/classnames' @@ -58,12 +56,8 @@ export const EditSlice: FC = (props) => { <> { - refs.setReference(ref) - if (ref) - lineClamp(ref, 4) - }} + className={cn('mr-0 line-clamp-4 block', className)} + ref={refs.setReference} {...getReferenceProps()} > =14'} - line-clamp@1.0.0: - resolution: {integrity: sha512-dCDlvMj572RIRBQ3x9aIX0DTdt2St1bMdpi64jVTAi5vqBck7wf+J97//+J7+pS80rFJaYa8HiyXCTp0flpnBA==} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -12913,8 +12907,6 @@ snapshots: lilconfig@3.1.3: {} - line-clamp@1.0.0: {} - lines-and-columns@1.2.4: {} lint-staged@15.5.2: