File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export function CodeBlock({
4646 maxVisibleLines = 10 ,
4747 defaultExpanded = false ,
4848} : CodeBlockProps ) {
49- const { theme : applicationTheme , resolvedTheme } = useTheme ( ) ;
49+ const { resolvedTheme } = useTheme ( ) ;
5050 const [ copied , setCopied ] = React . useState ( false ) ;
5151 const [ localActiveTab , setLocalActiveTab ] = React . useState < string | undefined > ( activeTab || ( tabs && tabs . length > 0 ? tabs [ 0 ] . value : undefined ) ) ;
5252 const [ isExpanded , setIsExpanded ] = React . useState ( defaultExpanded ) ;
@@ -85,7 +85,7 @@ export function CodeBlock({
8585
8686 const codeLines = activeContent . split ( "\n" ) ;
8787 const shouldCollapse = collapsible && codeLines . length > maxVisibleLines ;
88- const displayedCode = shouldCollapse && ! isExpanded
88+ const displayedCode = shouldCollapse && ! isExpanded
8989 ? codeLines . slice ( 0 , maxVisibleLines ) . join ( "\n" )
9090 : activeContent ;
9191
@@ -364,7 +364,7 @@ export function CodeBlock({
364364 </ pre >
365365 ) }
366366 </ Highlight >
367-
367+
368368 { shouldCollapse && ! isExpanded && (
369369 < div className = "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-background to-transparent pointer-events-none" />
370370 ) }
You can’t perform that action at this time.
0 commit comments