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({
46
46
maxVisibleLines = 10 ,
47
47
defaultExpanded = false ,
48
48
} : CodeBlockProps ) {
49
- const { theme : applicationTheme , resolvedTheme } = useTheme ( ) ;
49
+ const { resolvedTheme } = useTheme ( ) ;
50
50
const [ copied , setCopied ] = React . useState ( false ) ;
51
51
const [ localActiveTab , setLocalActiveTab ] = React . useState < string | undefined > ( activeTab || ( tabs && tabs . length > 0 ? tabs [ 0 ] . value : undefined ) ) ;
52
52
const [ isExpanded , setIsExpanded ] = React . useState ( defaultExpanded ) ;
@@ -85,7 +85,7 @@ export function CodeBlock({
85
85
86
86
const codeLines = activeContent . split ( "\n" ) ;
87
87
const shouldCollapse = collapsible && codeLines . length > maxVisibleLines ;
88
- const displayedCode = shouldCollapse && ! isExpanded
88
+ const displayedCode = shouldCollapse && ! isExpanded
89
89
? codeLines . slice ( 0 , maxVisibleLines ) . join ( "\n" )
90
90
: activeContent ;
91
91
@@ -364,7 +364,7 @@ export function CodeBlock({
364
364
</ pre >
365
365
) }
366
366
</ Highlight >
367
-
367
+
368
368
{ shouldCollapse && ! isExpanded && (
369
369
< div className = "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-background to-transparent pointer-events-none" />
370
370
) }
You can’t perform that action at this time.
0 commit comments