Skip to content

Commit

Permalink
Josh & Matt reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 1, 2019
1 parent 8447637 commit 45bf57f
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 8 deletions.
4 changes: 4 additions & 0 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const styles = theme => ({
},
},
demo: {
margin: 'auto',
borderRadius: theme.shape.borderRadius,
backgroundColor:
theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[900],
Expand Down Expand Up @@ -349,6 +350,9 @@ class Demo extends React.Component {
})}
onMouseEnter={this.handleDemoHover}
onMouseLeave={this.handleDemoHover}
style={{
maxWidth: demoOptions.maxWidth,
}}
>
<Frame>
<DemoComponent />
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/app-bar/app-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ A side searchbar.

## Bottom App Bar

{{"demo": "pages/demos/app-bar/BottomAppBar.js", "iframe": true}}
{{"demo": "pages/demos/app-bar/BottomAppBar.js", "iframe": true, "maxWidth": 600}}
1 change: 1 addition & 0 deletions docs/src/pages/demos/snackbars/FabIntegrationSnackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const useStyles = makeStyles(theme => ({
},
appFrame: {
height: 356,
background: theme.palette.background.paper,
},
menuButton: {
marginRight: theme.spacing(2),
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/demos/snackbars/FabIntegrationSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const useStyles = makeStyles((theme: Theme) => ({
},
appFrame: {
height: 356,
background: theme.palette.background.paper,
},
menuButton: {
marginRight: theme.spacing(2),
Expand Down
10 changes: 8 additions & 2 deletions docs/src/pages/demos/snackbars/TransitionsSnackbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import Button from '@material-ui/core/Button';
import Snackbar from '@material-ui/core/Snackbar';
import Fade from '@material-ui/core/Fade';
import Slide from '@material-ui/core/Slide';
import Grow from '@material-ui/core/Grow';

function TransitionSlide(props) {
function SlideTransition(props) {
return <Slide {...props} direction="up" />;
}

function GrowTransition(props) {
return <Grow {...props} />;
}

function TransitionsSnackbar() {
const [state, setState] = React.useState({
open: false,
Expand All @@ -31,7 +36,8 @@ function TransitionsSnackbar() {
return (
<div>
<Button onClick={handleClick(Fade)}>Fade Transition</Button>
<Button onClick={handleClick(TransitionSlide)}>Slide Transition</Button>
<Button onClick={handleClick(SlideTransition)}>Slide Transition</Button>
<Button onClick={handleClick(GrowTransition)}>Grow Transition</Button>
<Snackbar
open={state.open}
onClose={handleClose}
Expand Down
10 changes: 8 additions & 2 deletions docs/src/pages/demos/snackbars/TransitionsSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ import Button from '@material-ui/core/Button';
import Snackbar from '@material-ui/core/Snackbar';
import Fade from '@material-ui/core/Fade';
import Slide from '@material-ui/core/Slide';
import Grow from '@material-ui/core/Grow';
import { TransitionProps } from '@material-ui/core/transitions/transition';

function TransitionSlide(props: TransitionProps) {
function SlideTransition(props: TransitionProps) {
return <Slide {...props} direction="up" />;
}

function GrowTransition(props: TransitionProps) {
return <Grow {...props} />;
}

function TransitionsSnackbar() {
const [state, setState] = React.useState({
open: false,
Expand All @@ -32,7 +37,8 @@ function TransitionsSnackbar() {
return (
<div>
<Button onClick={handleClick(Fade)}>Fade Transition</Button>
<Button onClick={handleClick(TransitionSlide)}>Slide Transition</Button>
<Button onClick={handleClick(SlideTransition)}>Slide Transition</Button>
<Button onClick={handleClick(GrowTransition)}>Grow Transition</Button>
<Snackbar
open={state.open}
onClose={handleClose}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/demos/snackbars/snackbars.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ When multiple snackbar updates are necessary, they should appear one at a time.

Snackbars should appear above FABs (on mobile).

{{"demo": "pages/demos/snackbars/FabIntegrationSnackbar.js", "iframe": true}}
{{"demo": "pages/demos/snackbars/FabIntegrationSnackbar.js", "iframe": true, "maxWidth": 600}}

### Control Direction

Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Slide/Slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function setTranslateValue(props, node) {
}

/**
* The Slide transition is used by the [Snackbar](/demos/snackbars/) component.
* The Slide transition is used by the [Drawer](/demos/drawers/) component.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*/
class Slide extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion pages/api/slide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ filename: /packages/material-ui/src/Slide/Slide.js
import Slide from '@material-ui/core/Slide';
```

The Slide transition is used by the [Snackbar](/demos/snackbars/) component.
The Slide transition is used by the [Drawer](/demos/drawers/) component.
It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.

## Props
Expand Down

0 comments on commit 45bf57f

Please sign in to comment.