Javi Velasco 2016-06-19 21:37:46 +02:00
parent 6cd4202c6c
commit 5b76a7fe78
4 changed files with 10 additions and 4 deletions

View File

@ -11,7 +11,10 @@ const factory = (Check) => {
checked: PropTypes.bool,
className: PropTypes.string,
disabled: PropTypes.bool,
label: PropTypes.any,
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
name: PropTypes.string,
onChange: PropTypes.func,
theme: PropTypes.shape({

View File

@ -46,7 +46,7 @@ If you want to provide a theme via context, the component key is `RTCheckbox`.
| `checked` | `Boolean` | `false` | Value for the checkbox, can be `true` or `false`. |
| `className` | `String` | `''` | Sets a class to give customized styles to the checkbox field.|
| `disabled` | `Boolean` | `false` | If true, the checkbox shown as disabled and cannot be modified.|
| `label` | `String` | | Text label to attach next to the checkbox element.|
| `label` | `String` of `node` | | Text label to attach next to the checkbox element.|
| `name` | `String` | `false` | The name of the field to set in the input checkbox.|
| `onBlur` | `Function` | | Callback called when the checkbox is blurred.|
| `onChange` | `Function` | | Callback called when the checkbox value is changed.|

View File

@ -11,7 +11,10 @@ const factory = (Radio) => {
checked: PropTypes.bool,
className: PropTypes.string,
disabled: PropTypes.bool,
label: PropTypes.string,
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node
]),
name: PropTypes.string,
onBlur: PropTypes.func,
onChange: PropTypes.func,

View File

@ -56,7 +56,7 @@ The inner component to compose radio selectors. They will be rendered as radio i
| `checked` | `Boolean` | `false` | If true, the input element will be selected by default. Transferred from the parent. |
| `className` | `String` | `''` | Set a class to give custom styles to the radio button.|
| `disabled` | `Boolean` | `false` | If true, the item will be displayed as disabled.|
| `label` | `String` | `''` | Label for the radio button.|
| `label` | `String` of `node` | `''` | Label for the radio button.|
| `name` | `String` | | Name for the input element. |
| `onBlur` | `Function` | | Callback function that will be invoked when the input is blurred. |
| `onChange` | `Function` | | Callback function that will be invoked when the value changes. |