import { ModelType } from '@joplin/lib/BaseModel'; import * as React from 'react'; import { useMemo } from 'react'; export type ListItemRef = React.Ref; interface Props { containerRef: ListItemRef; selected: boolean; itemIndex: number; itemCount: number; expanded?: boolean|undefined; depth: number; className?: string; highlightOnHover: boolean; children: (React.ReactNode[])|React.ReactNode; onContextMenu?: React.MouseEventHandler; onDrag?: React.DragEventHandler; onDragStart?: React.DragEventHandler; onDragOver?: React.DragEventHandler; onDrop?: React.DragEventHandler; draggable?: boolean; 'data-folder-id'?: string; 'data-id'?: string; 'data-type'?: ModelType; } const ListItemWrapper: React.FC = props => { const style = useMemo(() => { return { '--depth': props.depth, } as React.CSSProperties; }, [props.depth]); return (
{props.children}
); }; export default ListItemWrapper;