import React from 'react'; interface CustomRendererProps { rows: any[]; stylesheet: any; useInlineStyles: boolean; } // Not a react component, but returns a function that returns a react component // to be used as a custom code renderer in the SyntaxHighlighter component const customCodeRenderer = ({ animation, animationDuration, animationTimingFunction }: any) => { // Memoize the animation style to avoid recreating it for each text segment const animationStyle = { animationName: animation || '', animationDuration, animationTimingFunction, animationIterationCount: 1, whiteSpace: 'pre-wrap', display: 'inline-block', }; return ({rows, stylesheet, useInlineStyles}: CustomRendererProps) => rows.map((node, i) => (