import type { IObjectAny } from '@schema-render/core-react' import { Tooltip } from 'antd' import type { FC } from 'react' import { isEmpty } from '../utils/common' interface ILongTextProps { value?: string options?: IObjectAny } const LongText: FC = ({ value, options = {} }) => { const text = isEmpty(value) ? '-' : String(value) const { maxLength = 10, ...tooltipProps } = options return text.length > maxLength ? ( {text.slice(0, maxLength - 1)}... ) : ( <>{text} ) } export default LongText