Skip to content

Commit

Permalink
Revert change of layout, previous version looks better
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 18, 2019
1 parent 33c82bd commit 0fb3381
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
43 changes: 15 additions & 28 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,21 @@ const styles = theme => ({
},
},
demo: {
position: 'relative',
outline: 0,
margin: 'auto',
[theme.breakpoints.up('sm')]: {
borderRadius: theme.shape.borderRadius,
},
backgroundColor: theme.palette.background.level2,
borderRadius: theme.shape.borderRadius,
display: 'flex',
justifyContent: 'center',
border: `1px solid ${fade(theme.palette.action.active, 0.12)}`,
padding: theme.spacing(2),
'& $demoInner': {
border: `1px solid ${fade(theme.palette.action.active, 0.12)}`,
borderRadius: theme.shape.borderRadius,
backgroundColor: theme.palette.background.paper,
[theme.breakpoints.up('sm')]: {
padding: theme.spacing(3),
},
},
demoBg: {
'& $demoInner': {
border: 'none',
borderRadius: 0,
backgroundColor: 'transparent',
padding: 0,
},
},
demoInner: {
position: 'relative',
display: 'flex',
justifyContent: 'center',
padding: theme.spacing(2),
border: 'none',
backgroundColor: theme.palette.background.level2,
},
demoHiddenHeader: {
paddingTop: theme.spacing(2),
Expand Down Expand Up @@ -312,14 +301,12 @@ function Demo(props) {
onMouseEnter={handleDemoHover}
onMouseLeave={handleDemoHover}
>
<div className={classes.demoInner}>
<DemoSandboxed
style={demoSandboxedStyle}
component={DemoComponent}
iframe={demoOptions.iframe}
name={demoName}
/>
</div>
<DemoSandboxed
style={demoSandboxedStyle}
component={DemoComponent}
iframe={demoOptions.iframe}
name={demoName}
/>
</div>
<div className={classes.anchorLink} id={`${demoName}.js`} />
<div className={classes.anchorLink} id={`${demoName}.tsx`} />
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/modal/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Alternatively, you can use [react-spring](https://github.com/react-spring/react-
React [doesn't support](https://github.com/facebook/react/issues/13097) the [`createPortal()`](https://reactjs.org/docs/portals.html) API on the server.
In order to display the modal, you need to disable the portal feature with the `disablePortal` prop:

{{"demo": "pages/components/modal/ServerModal.js", "bg": true}}
{{"demo": "pages/components/modal/ServerModal.js"}}

## Accessibility

Expand Down

0 comments on commit 0fb3381

Please sign in to comment.