Skip to content

Commit

Permalink
Merge branch 'next' into list-specification
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Apr 15, 2019
2 parents 4a9254f + 71d4ebe commit af3b825
Show file tree
Hide file tree
Showing 121 changed files with 1,076 additions and 1,074 deletions.
17 changes: 6 additions & 11 deletions docs/src/pages/demos/breadcrumbs/CollapsedBreadcrumbs.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
/* eslint-disable jsx-a11y/anchor-is-valid */

import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link';

const styles = theme => ({
const useStyles = makeStyles(theme => ({
root: {
justifyContent: 'center',
flexWrap: 'wrap',
},
paper: {
padding: theme.spacing(1, 2),
},
});
}));

function handleClick(event) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function CollapsedBreadcrumbs(props) {
const { classes } = props;
function CollapsedBreadcrumbs() {
const classes = useStyles();

return (
<Paper elevation={0} className={classes.paper}>
Expand All @@ -47,8 +46,4 @@ function CollapsedBreadcrumbs(props) {
);
}

CollapsedBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(CollapsedBreadcrumbs);
export default CollapsedBreadcrumbs;
20 changes: 7 additions & 13 deletions docs/src/pages/demos/breadcrumbs/CollapsedBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
/* eslint-disable jsx-a11y/anchor-is-valid */

import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, Theme, createStyles, WithStyles } from '@material-ui/core/styles';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link';

interface CollapsedBreadcrumbsProps extends WithStyles<typeof styles> {}

const styles = (theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
justifyContent: 'center',
Expand All @@ -19,15 +16,16 @@ const styles = (theme: Theme) =>
paper: {
padding: theme.spacing(1, 2),
},
});
}),
);

function handleClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function CollapsedBreadcrumbs(props: CollapsedBreadcrumbsProps) {
const { classes } = props;
function CollapsedBreadcrumbs() {
const classes = useStyles();

return (
<Paper elevation={0} className={classes.paper}>
Expand All @@ -50,8 +48,4 @@ function CollapsedBreadcrumbs(props: CollapsedBreadcrumbsProps) {
);
}

CollapsedBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
} as any;

export default withStyles(styles)(CollapsedBreadcrumbs);
export default CollapsedBreadcrumbs;
17 changes: 6 additions & 11 deletions docs/src/pages/demos/breadcrumbs/CustomSeparator.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link';
import NavigateNextIcon from '@material-ui/icons/NavigateNext';

const styles = theme => ({
const useStyles = makeStyles(theme => ({
root: {
justifyContent: 'center',
flexWrap: 'wrap',
},
paper: {
padding: theme.spacing(1, 2),
},
});
}));

function handleClick(event) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function CustomSeparator(props) {
const { classes } = props;
function CustomSeparator() {
const classes = useStyles();

return (
<div className={classes.root}>
Expand Down Expand Up @@ -66,8 +65,4 @@ function CustomSeparator(props) {
);
}

CustomSeparator.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(CustomSeparator);
export default CustomSeparator;
20 changes: 7 additions & 13 deletions docs/src/pages/demos/breadcrumbs/CustomSeparator.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, Theme, createStyles, WithStyles } from '@material-ui/core/styles';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link';
import NavigateNextIcon from '@material-ui/icons/NavigateNext';

interface CustomSeparatorProps extends WithStyles<typeof styles> {}

const styles = (theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
justifyContent: 'center',
Expand All @@ -18,15 +15,16 @@ const styles = (theme: Theme) =>
paper: {
padding: theme.spacing(1, 2),
},
});
}),
);

function handleClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function CustomSeparator(props: CustomSeparatorProps) {
const { classes } = props;
function CustomSeparator() {
const classes = useStyles();

return (
<div className={classes.root}>
Expand Down Expand Up @@ -69,8 +67,4 @@ function CustomSeparator(props: CustomSeparatorProps) {
);
}

CustomSeparator.propTypes = {
classes: PropTypes.object.isRequired,
} as any;

export default withStyles(styles)(CustomSeparator);
export default CustomSeparator;
17 changes: 6 additions & 11 deletions docs/src/pages/demos/breadcrumbs/IconBreadcrumbs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
Expand All @@ -9,7 +8,7 @@ import HomeIcon from '@material-ui/icons/Home';
import WhatshotIcon from '@material-ui/icons/Whatshot';
import GrainIcon from '@material-ui/icons/Grain';

const styles = theme => ({
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(1, 2),
},
Expand All @@ -21,15 +20,15 @@ const styles = theme => ({
width: 20,
height: 20,
},
});
}));

function handleClick(event) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function IconBreadcrumbs(props) {
const { classes } = props;
function IconBreadcrumbs() {
const classes = useStyles();
return (
<Paper elevation={0} className={classes.root}>
<Breadcrumbs aria-label="Breadcrumb">
Expand All @@ -55,8 +54,4 @@ function IconBreadcrumbs(props) {
);
}

IconBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(IconBreadcrumbs);
export default IconBreadcrumbs;
20 changes: 7 additions & 13 deletions docs/src/pages/demos/breadcrumbs/IconBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, Theme, createStyles, WithStyles } from '@material-ui/core/styles';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
Expand All @@ -9,9 +8,7 @@ import HomeIcon from '@material-ui/icons/Home';
import WhatshotIcon from '@material-ui/icons/Whatshot';
import GrainIcon from '@material-ui/icons/Grain';

interface IconBreadcrumbsProps extends WithStyles<typeof styles> {}

const styles = (theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
padding: theme.spacing(1, 2),
Expand All @@ -24,15 +21,16 @@ const styles = (theme: Theme) =>
width: 20,
height: 20,
},
});
}),
);

function handleClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function IconBreadcrumbs(props: IconBreadcrumbsProps) {
const { classes } = props;
function IconBreadcrumbs() {
const classes = useStyles();
return (
<Paper elevation={0} className={classes.root}>
<Breadcrumbs aria-label="Breadcrumb">
Expand All @@ -58,8 +56,4 @@ function IconBreadcrumbs(props: IconBreadcrumbsProps) {
);
}

IconBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
} as any;

export default withStyles(styles)(IconBreadcrumbs);
export default IconBreadcrumbs;
17 changes: 6 additions & 11 deletions docs/src/pages/demos/breadcrumbs/SimpleBreadcrumbs.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Link from '@material-ui/core/Link';

const styles = theme => ({
const useStyles = makeStyles(theme => ({
root: {
justifyContent: 'center',
flexWrap: 'wrap',
},
paper: {
padding: theme.spacing(1, 2),
},
});
}));

function handleClick(event) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function SimpleBreadcrumbs(props) {
const { classes } = props;
function SimpleBreadcrumbs() {
const classes = useStyles();
return (
<div className={classes.root}>
<Paper elevation={0} className={classes.paper}>
Expand Down Expand Up @@ -59,8 +58,4 @@ function SimpleBreadcrumbs(props) {
);
}

SimpleBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(SimpleBreadcrumbs);
export default SimpleBreadcrumbs;
20 changes: 7 additions & 13 deletions docs/src/pages/demos/breadcrumbs/SimpleBreadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, Theme, createStyles, WithStyles } from '@material-ui/core/styles';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import Link from '@material-ui/core/Link';

interface SimpleBreadcrumbsProps extends WithStyles<typeof styles> {}

const styles = (theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
justifyContent: 'center',
Expand All @@ -17,15 +14,16 @@ const styles = (theme: Theme) =>
paper: {
padding: theme.spacing(1, 2),
},
});
}),
);

function handleClick(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}

function SimpleBreadcrumbs(props: SimpleBreadcrumbsProps) {
const { classes } = props;
function SimpleBreadcrumbs() {
const classes = useStyles();
return (
<div className={classes.root}>
<Paper elevation={0} className={classes.paper}>
Expand Down Expand Up @@ -62,8 +60,4 @@ function SimpleBreadcrumbs(props: SimpleBreadcrumbsProps) {
);
}

SimpleBreadcrumbs.propTypes = {
classes: PropTypes.object.isRequired,
} as any;

export default withStyles(styles)(SimpleBreadcrumbs);
export default SimpleBreadcrumbs;
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class Slider extends React.Component {
handleRef = ref => {
setRef(this.props.innerRef, ref);

// StrictMode ready
// #StrictMode ready
const nextContainer = ReactDOM.findDOMNode(ref);
const prevContainer = this.container;

Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui-lab/src/Slider/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('<Slider />', () => {

before(() => {
classes = getClasses(<Slider value={0} />);
mount = createMount();
// StrictMode violation: uses ButtonBase
mount = createMount({ strict: false });
});

after(() => {
Expand Down
Loading

0 comments on commit af3b825

Please sign in to comment.