From e2201bd8cc3d2efbd1f7dd856bd60b7b639ad480 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sun, 15 Mar 2020 00:54:57 +0100 Subject: [PATCH] [Checkbox] Document the default value's prop value --- docs/pages/api-docs/checkbox.md | 2 +- docs/pages/api-docs/switch.md | 2 +- packages/material-ui/src/Checkbox/Checkbox.js | 1 + packages/material-ui/src/Switch/Switch.js | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/pages/api-docs/checkbox.md b/docs/pages/api-docs/checkbox.md index cdb01fa3415845..f329cb79dd68d5 100644 --- a/docs/pages/api-docs/checkbox.md +++ b/docs/pages/api-docs/checkbox.md @@ -40,7 +40,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | required | bool | | If `true`, the `input` element will be required. | | size | 'small'
| 'medium'
| 'medium' | The size of the checkbox. `small` is equivalent to the dense checkbox styling. | | type | string | | The input component prop `type`. | -| value | any | | The value of the component. The DOM API casts this to a string. | +| value | any | | The value of the component. The DOM API casts this to a string. The browser uses "on" as the default value. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/switch.md b/docs/pages/api-docs/switch.md index e33b56c704c50c..75df15b0c49ec1 100644 --- a/docs/pages/api-docs/switch.md +++ b/docs/pages/api-docs/switch.md @@ -39,7 +39,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | required | bool | | If `true`, the `input` element will be required. | | size | 'small'
| 'medium'
| 'medium' | The size of the switch. `small` is equivalent to the dense switch styling. | | type | string | | The input component prop `type`. | -| value | any | | The value of the component. The DOM API casts this to a string. | +| value | any | | The value of the component. The DOM API casts this to a string. The browser uses "on" as the default value. | The `ref` is forwarded to the root element. 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, };