@@ -15,6 +15,7 @@ import clsx from 'clsx';
15
15
import grey from '@material-ui/core/colors/grey' ;
16
16
import IconButton from '@material-ui/core/IconButton' ;
17
17
import { getParameters } from 'codesandbox/lib/api/define' ;
18
+ import Tooltip from '@material-ui/core/Tooltip' ;
18
19
19
20
import GhIcon from './common/gh-svg-icon' ;
20
21
import CodesandboxIcon from './common/code-sandbox-svg-icon' ;
@@ -150,7 +151,16 @@ const CodeExample = ({ source, mode }) => {
150
151
< Grid container spacing = { 0 } className = "DocRawComponent" >
151
152
< Grid item xs = { 12 } >
152
153
< ExpansionPanel className = { classes . expansionPanel } >
153
- < ExpansionPanelSummary className = { classes . expansionPanelSummary } expandIcon = { < CodeIcon /> } >
154
+ < ExpansionPanelSummary
155
+ className = { classes . expansionPanelSummary }
156
+ expandIcon = {
157
+ < Tooltip title = "Expand code example" >
158
+ < IconButton >
159
+ < CodeIcon />
160
+ </ IconButton >
161
+ </ Tooltip >
162
+ }
163
+ >
154
164
{ Component && (
155
165
< Typography className = { classes . heading } component = "h4" variant = "h3" >
156
166
{ Component . name }
@@ -159,9 +169,11 @@ const CodeExample = ({ source, mode }) => {
159
169
< Box display = "flex" >
160
170
< form action = "https://codesandbox.io/api/v1/sandboxes/define" method = "POST" target = "_blank" >
161
171
< input type = "hidden" name = "parameters" value = { getPayload ( 'pf4' , codeSource ) } />
162
- < IconButton disableFocusRipple type = "submit" >
163
- < CodesandboxIcon />
164
- </ IconButton >
172
+ < Tooltip title = "Edit in codesandbox" >
173
+ < IconButton disableFocusRipple type = "submit" >
174
+ < CodesandboxIcon />
175
+ </ IconButton >
176
+ </ Tooltip >
165
177
</ form >
166
178
< Link
167
179
component = "button"
@@ -170,7 +182,11 @@ const CodeExample = ({ source, mode }) => {
170
182
rel = "noopener noreferrer"
171
183
onClick = { ( event ) => event . stopPropagation ( ) }
172
184
>
173
- < GhIcon style = { { color : grey [ 700 ] } } />
185
+ < Tooltip title = "View source on github" >
186
+ < IconButton >
187
+ < GhIcon style = { { color : grey [ 700 ] } } />
188
+ </ IconButton >
189
+ </ Tooltip >
174
190
</ Link >
175
191
</ Box >
176
192
</ ExpansionPanelSummary >
0 commit comments