How to use the react-diff-view.getCollapsedLinesCountBetween function in react-diff-view

To help you get started, we’ve selected a few react-diff-view examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github otakustay / react-diff-view / site / components / DiffView / UnfoldCollapsed.js View on Github external
{
                    collapsedLines > 10 && (
                        
                    )
                }
                
            
        );
    }

    const collapsedLines = getCollapsedLinesCountBetween(previousHunk, currentHunk);

    if (!previousHunk) {
        if (!collapsedLines) {
            return null;
        }

        const start = Math.max(currentHunk.oldStart - 10, 1);

        return (
            <>
                
                {
                    collapsedLines > 10 && (