File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/spectacle/src/components Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -112,13 +112,11 @@ const CodePane = forwardRef<HTMLDivElement, CodePaneProps>(
112112
113113 const scrollTarget = useRef < HTMLElement > ( null ) ;
114114
115- const getLineNumberProps = useCallback (
115+ const getLineNumberStyle = useCallback (
116116 ( lineNumber : number ) => {
117- if ( ! isActive ) return ;
117+ if ( ! isActive ) return { } ;
118118 const range = getRangeFormat ( numberOfSteps , highlightRanges , step ) ;
119- return {
120- style : getStyleForLineNumber ( lineNumber , range )
121- } ;
119+ return getStyleForLineNumber ( lineNumber , range ) ;
122120 } ,
123121 [ isActive , highlightRanges , numberOfSteps , step ]
124122 ) ;
@@ -174,7 +172,7 @@ const CodePane = forwardRef<HTMLDivElement, CodePaneProps>(
174172 wrapLines
175173 showLineNumbers = { showLineNumbers }
176174 lineProps = { getLineProps }
177- lineNumberProps = { getLineNumberProps }
175+ lineNumberStyle = { getLineNumberStyle }
178176 style = { syntaxTheme }
179177 >
180178 { children }
You can’t perform that action at this time.
0 commit comments