@@ -6,6 +6,7 @@ import languages from 'react-syntax-highlighter/dist/esm/languages/prism/support
6
6
import ExpandMoreIcon from "@material-ui/icons/ExpandMore" ;
7
7
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined' ;
8
8
import CheckCircleOutlineIcon from '@material-ui/icons/CheckCircleOutline' ;
9
+ import CodeIcon from '@material-ui/icons/Code' ;
9
10
10
11
const useStyles = makeStyles ( ( theme ) => ( {
11
12
container : {
@@ -38,18 +39,27 @@ const useStyles = makeStyles((theme) => ({
38
39
width : '0.813rem' ,
39
40
} ,
40
41
summary : {
42
+ color : 'rgb(166, 38, 164)' ,
41
43
textDecoration : 'underline' ,
42
44
textDecorationStyle : 'dotted' ,
43
45
cursor : 'pointer' ,
44
46
backgroundColor : 'transparent' ,
45
47
boxShadow : 'none' ,
46
48
display : 'inline-flex' ,
47
- minHeight : '32px !important' ,
49
+ minHeight : '2rem !important' ,
48
50
padding : 0 ,
49
51
'&:hover' : {
50
52
textDecoration : 'none'
51
53
}
52
54
} ,
55
+ summaryText : {
56
+ display : 'inline-flex' ,
57
+ alignItems : 'center'
58
+ } ,
59
+ summaryTextIcon : {
60
+ marginRight : 8 ,
61
+ fontSize : '1rem'
62
+ } ,
53
63
details : {
54
64
padding : 0 ,
55
65
backgroundColor : 'transparent'
@@ -117,7 +127,12 @@ export const CodeBlock = memo(({ value, language }: CodeBlockProps) => {
117
127
return (
118
128
< Accordion expanded = { expanded } onChange = { handleToggle } className = { classes . accordion } >
119
129
< AccordionSummary expandIcon = { < ExpandMoreIcon /> } className = { classes . summary } >
120
- < Typography > { expanded ? 'Hide' : 'Show' } code block ({ codeLines . length } LOC)</ Typography >
130
+ < Typography
131
+ className = { classes . summaryText }
132
+ >
133
+ < CodeIcon className = { classes . summaryTextIcon } />
134
+ { expanded ? 'Hide' : 'Show' } code block ({ codeLines . length } LOC)
135
+ </ Typography >
121
136
</ AccordionSummary >
122
137
< AccordionDetails className = { classes . details } >
123
138
< div className = { classes . container } >
0 commit comments