UNPKG

@xzdarcy/react-timeline-editor

Version:

[![npm version](https://img.shields.io/npm/v/@xzdarcy/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@xzdarcy/react-timeline-editor) [![npm downloads](https://img.shields.io/npm/dm/@xzdarcy/react-timeline-editor.svg?style=flat

22 lines (21 loc) 805 B
import React, { FC } from 'react'; import { ScrollSync } from 'react-virtualized'; import { CommonProp } from '../../interface/common_prop'; import './cursor.less'; /** 动画时间轴组件参数 */ export type CursorProps = CommonProp & { /** 距离左侧滚动距离 */ scrollLeft: number; /** 设置光标位置 */ setCursor: (param: { left?: number; time?: number; }) => boolean; /** 时间轴区域dom ref */ areaRef: React.MutableRefObject<HTMLDivElement>; /** 设置scroll left */ deltaScrollLeft: (delta: number) => void; /** 滚动同步ref(TODO: 该数据用于临时解决scrollLeft拖住时不同步问题) */ scrollSync: React.MutableRefObject<ScrollSync>; }; export declare const Cursor: FC<CursorProps>;