) => {
+ setState({ ...state, [event.target.name]: event.target.checked });
};
return (
-
-
-
+
+
+
diff --git a/docs/src/pages/components/switches/SwitchesGroup.js b/docs/src/pages/components/switches/SwitchesGroup.js
index a81d8719d72acd..c18f8560f1f8ee 100644
--- a/docs/src/pages/components/switches/SwitchesGroup.js
+++ b/docs/src/pages/components/switches/SwitchesGroup.js
@@ -13,8 +13,8 @@ export default function SwitchesGroup() {
antoine: true,
});
- const handleChange = name => event => {
- setState({ ...state, [name]: event.target.checked });
+ const handleChange = event => {
+ setState({ ...state, [event.target.name]: event.target.checked });
};
return (
@@ -22,17 +22,15 @@ export default function SwitchesGroup() {
Assign responsibility
}
+ control={}
label="Gilad Gray"
/>
}
+ control={}
label="Jason Killian"
/>
- }
+ control={}
label="Antoine Llorca"
/>
diff --git a/docs/src/pages/components/switches/SwitchesGroup.tsx b/docs/src/pages/components/switches/SwitchesGroup.tsx
index f3a7cbe3d28c25..5fedc68e3daf75 100644
--- a/docs/src/pages/components/switches/SwitchesGroup.tsx
+++ b/docs/src/pages/components/switches/SwitchesGroup.tsx
@@ -13,8 +13,8 @@ export default function SwitchesGroup() {
antoine: true,
});
- const handleChange = (name: string) => (event: React.ChangeEvent) => {
- setState({ ...state, [name]: event.target.checked });
+ const handleChange = (event: React.ChangeEvent) => {
+ setState({ ...state, [event.target.name]: event.target.checked });
};
return (
@@ -22,17 +22,15 @@ export default function SwitchesGroup() {
Assign responsibility
}
+ control={}
label="Gilad Gray"
/>
}
+ control={}
label="Jason Killian"
/>
- }
+ control={}
label="Antoine Llorca"
/>
diff --git a/docs/src/pages/components/text-fields/FormattedInputs.js b/docs/src/pages/components/text-fields/FormattedInputs.js
index d3386d72e70ffa..89dfe4ca85d2c5 100644
--- a/docs/src/pages/components/text-fields/FormattedInputs.js
+++ b/docs/src/pages/components/text-fields/FormattedInputs.js
@@ -69,10 +69,10 @@ export default function FormattedInputs() {
numberformat: '1320',
});
- const handleChange = name => event => {
+ const handleChange = event => {
setValues({
...values,
- [name]: event.target.value,
+ [event.target.name]: event.target.value,
});
};
@@ -82,7 +82,8 @@ export default function FormattedInputs() {
react-text-mask
@@ -90,7 +91,8 @@ export default function FormattedInputs() {
(event: React.ChangeEvent) => {
+ const handleChange = (event: React.ChangeEvent) => {
setValues({
...values,
- [name]: event.target.value,
+ [event.target.name]: event.target.value,
});
};
@@ -88,7 +88,8 @@ export default function FormattedInputs() {
react-text-mask
@@ -96,7 +97,8 @@ export default function FormattedInputs() {
({
},
cardHeader: {
backgroundColor:
- theme.palette.type === 'dark' ? theme.palette.grey[700] : theme.palette.grey[200],
+ theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[700],
},
cardPricing: {
display: 'flex',
diff --git a/docs/src/pages/getting-started/templates/sign-in-side/SignInSide.js b/docs/src/pages/getting-started/templates/sign-in-side/SignInSide.js
index 54b9be8c75a99f..3b177d13abc81b 100644
--- a/docs/src/pages/getting-started/templates/sign-in-side/SignInSide.js
+++ b/docs/src/pages/getting-started/templates/sign-in-side/SignInSide.js
@@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({
backgroundImage: 'url(https://source.unsplash.com/random)',
backgroundRepeat: 'no-repeat',
backgroundColor:
- theme.palette.type === 'dark' ? theme.palette.grey[900] : theme.palette.grey[50],
+ theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[900],
backgroundSize: 'cover',
backgroundPosition: 'center',
},
diff --git a/docs/src/pages/getting-started/templates/sticky-footer/StickyFooter.js b/docs/src/pages/getting-started/templates/sticky-footer/StickyFooter.js
index 44f9f578596ef6..9d16ff4d317427 100644
--- a/docs/src/pages/getting-started/templates/sticky-footer/StickyFooter.js
+++ b/docs/src/pages/getting-started/templates/sticky-footer/StickyFooter.js
@@ -32,7 +32,7 @@ const useStyles = makeStyles(theme => ({
padding: theme.spacing(3, 2),
marginTop: 'auto',
backgroundColor:
- theme.palette.type === 'dark' ? theme.palette.grey[800] : theme.palette.grey[200],
+ theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[800],
},
}));
diff --git a/packages/material-ui/src/Checkbox/Checkbox.js b/packages/material-ui/src/Checkbox/Checkbox.js
index 5a659554d306ca..4dce708ebb3f49 100644
--- a/packages/material-ui/src/Checkbox/Checkbox.js
+++ b/packages/material-ui/src/Checkbox/Checkbox.js
@@ -174,6 +174,7 @@ Checkbox.propTypes = {
type: PropTypes.string,
/**
* The value of the component. The DOM API casts this to a string.
+ * The browser uses "on" as the default value.
*/
value: PropTypes.any,
};
diff --git a/packages/material-ui/src/Switch/Switch.js b/packages/material-ui/src/Switch/Switch.js
index 66907b9cb43557..3cbd060fd8a3d9 100644
--- a/packages/material-ui/src/Switch/Switch.js
+++ b/packages/material-ui/src/Switch/Switch.js
@@ -267,6 +267,7 @@ Switch.propTypes = {
type: PropTypes.string,
/**
* The value of the component. The DOM API casts this to a string.
+ * The browser uses "on" as the default value.
*/
value: PropTypes.any,
};
diff --git a/packages/material-ui/src/TableRow/TableRow.js b/packages/material-ui/src/TableRow/TableRow.js
index 2c647d7d7447c5..e37741476d643f 100644
--- a/packages/material-ui/src/TableRow/TableRow.js
+++ b/packages/material-ui/src/TableRow/TableRow.js
@@ -16,7 +16,7 @@ export const styles = theme => ({
'&$hover:hover': {
backgroundColor: theme.palette.action.hover,
},
- '&$selected,&$selected:hover': {
+ '&$selected, &$selected:hover': {
backgroundColor: fade(theme.palette.secondary.main, theme.palette.action.selectedOpacity),
},
},