1
1
import React , { FC , useState } from 'react' ;
2
2
import { Box , FlexProps , Flex } from 'rebass' ;
3
3
import SyntaxHighlighter from 'react-syntax-highlighter' ;
4
- import { useTheme } from '../../theme/theme' ;
5
4
import Button from '../button' ;
6
5
import ExpandViewer from '../expand-viewer' ;
7
6
@@ -15,6 +14,7 @@ import Value from '../typography/value';
15
14
import { copyToClipboard , saveToFile } from '../../utils' ;
16
15
import { PopupProps } from '../popup' ;
17
16
import { GetIcon , IconName } from '../icon' ;
17
+ import { hybrid } from 'react-syntax-highlighter/dist/esm/styles/hljs' ;
18
18
19
19
const CONTENT_UPPER_BOUND = 12 ;
20
20
@@ -122,8 +122,6 @@ const CodeSnippet: FC<CodeSnippetProps> = ({
122
122
maxHeightOfCode,
123
123
...props
124
124
} ) => {
125
- const theme = useTheme ( ) ;
126
-
127
125
return (
128
126
< Flex width = "100%" sx = { styles } height = "100%" >
129
127
< Flex width = "100%" sx = { codeHeaderStyles } >
@@ -149,12 +147,10 @@ const CodeSnippet: FC<CodeSnippetProps> = ({
149
147
p = { 0 }
150
148
>
151
149
< SyntaxHighlighter
150
+ style = { hybrid }
152
151
wrapLongLines = { wrapLongLines }
153
152
showLineNumbers = { showLineNumbers }
154
- lineNumberStyle = { {
155
- ...lineNumberStyles ,
156
- background : theme . colors . grayShade1 ,
157
- } }
153
+ lineNumberStyle = { lineNumberStyles }
158
154
language = { language }
159
155
customStyle = { {
160
156
...boxStyles ,
0 commit comments