@@ -13,9 +13,11 @@ import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';
1313import Paper from '@material-ui/core/Paper' ;
1414import clsx from 'clsx' ;
1515import grey from '@material-ui/core/colors/grey' ;
16+ import IconButton from '@material-ui/core/IconButton' ;
1617import { getParameters } from 'codesandbox/lib/api/define' ;
1718
1819import GhIcon from './common/gh-svg-icon' ;
20+ import CodesandboxIcon from './common/code-sandbox-svg-icon' ;
1921
2022const CodeEditor = dynamic ( import ( './code-editor' ) , {
2123 ssr : false
@@ -35,9 +37,11 @@ const useStyles = makeStyles((theme) => ({
3537 padding : 16
3638 } ,
3739 heading : {
38- fontSize : theme . typography . pxToRem ( 15 ) ,
40+ fontSize : theme . typography . pxToRem ( 20 ) ,
3941 fontWeight : theme . typography . fontWeightRegular ,
40- flexGrow : 1
42+ flexGrow : 1 ,
43+ display : 'flex' ,
44+ alignItems : 'center'
4145 } ,
4246 secondaryHeading : {
4347 fontSize : theme . typography . pxToRem ( 15 ) ,
@@ -147,13 +151,20 @@ const CodeExample = ({ source, mode }) => {
147151 < Grid item xs = { 12 } >
148152 < ExpansionPanel className = { classes . expansionPanel } >
149153 < 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+ ) }
151159 < Box display = "flex" >
152160 < form action = "https://codesandbox.io/api/v1/sandboxes/define" method = "POST" target = "_blank" >
153161 < 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 >
155165 </ form >
156166 < Link
167+ component = "button"
157168 href = { `https://github.com/data-driven-forms/react-forms/tree/master/packages/react-renderer-demo/src/app/examples/${ source } .js` }
158169 target = "_blank"
159170 rel = "noopener noreferrer"
0 commit comments