@@ -13,9 +13,11 @@ import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';
13
13
import Paper from '@material-ui/core/Paper' ;
14
14
import clsx from 'clsx' ;
15
15
import grey from '@material-ui/core/colors/grey' ;
16
+ import IconButton from '@material-ui/core/IconButton' ;
16
17
import { getParameters } from 'codesandbox/lib/api/define' ;
17
18
18
19
import GhIcon from './common/gh-svg-icon' ;
20
+ import CodesandboxIcon from './common/code-sandbox-svg-icon' ;
19
21
20
22
const CodeEditor = dynamic ( import ( './code-editor' ) , {
21
23
ssr : false
@@ -35,9 +37,11 @@ const useStyles = makeStyles((theme) => ({
35
37
padding : 16
36
38
} ,
37
39
heading : {
38
- fontSize : theme . typography . pxToRem ( 15 ) ,
40
+ fontSize : theme . typography . pxToRem ( 20 ) ,
39
41
fontWeight : theme . typography . fontWeightRegular ,
40
- flexGrow : 1
42
+ flexGrow : 1 ,
43
+ display : 'flex' ,
44
+ alignItems : 'center'
41
45
} ,
42
46
secondaryHeading : {
43
47
fontSize : theme . typography . pxToRem ( 15 ) ,
@@ -147,13 +151,20 @@ const CodeExample = ({ source, mode }) => {
147
151
< Grid item xs = { 12 } >
148
152
< ExpansionPanel className = { classes . expansionPanel } >
149
153
< ExpansionPanelSummary className = { classes . expansionPanelSummary } expandIcon = { < CodeIcon /> } >
150
- { Component && < Typography className = { classes . heading } > { Component . name } </ Typography > }
154
+ { Component && (
155
+ < Typography className = { classes . heading } component = "h4" variant = "h3" >
156
+ { Component . name }
157
+ </ Typography >
158
+ ) }
151
159
< Box display = "flex" >
152
160
< form action = "https://codesandbox.io/api/v1/sandboxes/define" method = "POST" target = "_blank" >
153
161
< input type = "hidden" name = "parameters" value = { getPayload ( 'pf4' , codeSource ) } />
154
- < input type = "submit" value = "Open in sandbox" />
162
+ < IconButton disableFocusRipple type = "submit" >
163
+ < CodesandboxIcon />
164
+ </ IconButton >
155
165
</ form >
156
166
< Link
167
+ component = "button"
157
168
href = { `https://github.com/data-driven-forms/react-forms/tree/master/packages/react-renderer-demo/src/app/examples/${ source } .js` }
158
169
target = "_blank"
159
170
rel = "noopener noreferrer"
0 commit comments