Skip to content

Commit 107364b

Browse files
author
Marco Cesarato
committed
docs: add new props documentation
1 parent ac51d09 commit 107364b

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

PROPS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
| `colorRight` | Custom color of the Spinner right button | String | `#3E525F` | |
3131
| `color` | Custom color of the Spinner | String | `#3E525F` | |
3232
| `disabled` | Disable the Spinner or not | Boolean | `false` | |
33-
| `editable` | Set if input number field is editable or not | Boolean | `true` | |
33+
| `editable` | Set if input number field is editable or not | Boolean | `true` | |
3434
| `fontFamily` | Custom fontFamily of the text input of the Spinner | String | System Default | |
3535
| `fontSize` | Custom fontSize of the text input of the Spinner | Number | `14` | |
3636
| `height` | Custom height of the Spinner | Number | `50` | |
3737
| `initialValue` | Initial value of the Spinner | String<br>Number | `0` | |
3838
| `inputStyle` | Input Style (Text number at middle) | Object | | Could overwrite other props |
39+
| `inputProps` | Customized TextInput Component props | Object | `null` | |
40+
| `leftButtonProps` | Customized left button (Touchable Component) props | Object | `null` | |
3941
| `maxLength` | Limits the maximum number of characters that can be entered. | Number | | |
4042
| `max` | Max number permitted | String<br>Number | `null` | |
4143
| `min` | Min value permitted | String<br>Number | `0` | |
@@ -48,10 +50,13 @@
4850
| `onMax` | When max is reached get max number permitted | Function | | `(max) => { ... }` |
4951
| `onMin` | When min is reached get min number permitted | Function | | `(min) => { ... }` |
5052
| `onSubmitEditing` | Callback that is called when the text input's submit button is pressed | (e) => { ... } |
53+
| `placeholder` | The string that will be rendered when text input value is equal to zero | String | `null` | |
54+
| `placeholderTextColor` | The text color of the placeholder string. | String | `null` | |
5155
| `precision` | Max numbers permitted after comma | Integer | `2` | |
5256
| `prepend` | Custom element after left button | Component | |
5357
| `returnKeyLabel` | Sets the return key to the label. Use it instead of `returnKeyType`. | String | | |
5458
| `returnKeyType` | Determines how the return key should look. On Android you can also use `returnKeyLabel` | String | |
59+
| `rightButtonProps` | Customized right button (Touchable Component) props | Object | `null` | |
5560
| `rounded` | Use circular button | Boolean | `true` | |
5661
| `selectTextOnFocus` | If `true`, all text will automatically be selected on focus. | Bool | `false` | |
5762
| `selectionColor` | The highlight and cursor color of the text input. | String | `null` | |

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,30 @@ Check the "[Props List](PROPS.md)" file to have the complete list of component p
100100

101101
### Props
102102

103-
| Property | Description | Type | Default | Note |
104-
| ------------------- | --------------------------------------------------------------------------------------- | ---------------- | ------- | --------------------------------- |
105-
| `append` | Custom element before right button | Component | | |
106-
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
107-
| `disabled` | Disable the Spinner or not | Boolean | `false` | |
108-
| `editable` | Set if input number field is editable or not | Boolean | `true` | |
109-
| `initialValue` | Initial value of the Spinner | String<br>Number | `0` | |
110-
| `maxLength` | Limits the maximum number of characters that can be entered. | Number | | |
111-
| `max` | Max number permitted | String<br>Number | `null` |
112-
| `min` | Min value permitted | String<br>Number | `0` |
113-
| `precision` | Max numbers permitted after comma | Integer | `2` |
114-
| `prepend` | Custom element after left button | Component | |
115-
| `returnKeyLabel` | Sets the return key to the label. Use it instead of `returnKeyType`. | String | | |
116-
| `returnKeyType` | Determines how the return key should look. On Android you can also use `returnKeyLabel` | String | |
117-
| `selectTextOnFocus` | If `true`, all text will automatically be selected on focus. | Bool | `false` | |
118-
| `selectionColor` | The highlight and cursor color of the text input. | String | `null` | |
119-
| `step` | Value to increment or decrement the current spinner value | String<br>Number | `1` |
120-
| `type` | Type of spinner | String | `int` | Can be `int` or `real`/`float`... |
121-
| `value` | Controlled value of the Spinner | String<br>Number | `0` | |
103+
| Property | Description | Type | Default | Note |
104+
| ---------------------- | --------------------------------------------------------------------------------------- | ---------------- | ------- | --------------------------------- |
105+
| `append` | Custom element before right button | Component | | |
106+
| `autofocus` | If `true`, focuses the input on `componentDidMount`. | | `false` | |
107+
| `disabled` | Disable the Spinner or not | Boolean | `false` | |
108+
| `editable` | Set if input number field is editable or not | Boolean | `true` | |
109+
| `initialValue` | Initial value of the Spinner | String<br>Number | `0` | |
110+
| `inputProps` | Customized TextInput Component props | Object | `null` | |
111+
| `leftButtonProps` | Customized left button (Touchable Component) props | Object | `null` | |
112+
| `maxLength` | Limits the maximum number of characters that can be entered. | Number | | |
113+
| `max` | Max number permitted | String<br>Number | `null` |
114+
| `min` | Min value permitted | String<br>Number | `0` |
115+
| `placeholder` | The string that will be rendered when text input value is equal to zero | String | `null` | |
116+
| `placeholderTextColor` | The text color of the placeholder string. | String | `null` | |
117+
| `precision` | Max numbers permitted after comma | Integer | `2` |
118+
| `prepend` | Custom element after left button | Component | |
119+
| `returnKeyLabel` | Sets the return key to the label. Use it instead of `returnKeyType`. | String | | |
120+
| `returnKeyType` | Determines how the return key should look. On Android you can also use `returnKeyLabel` | String | |
121+
| `rightButtonProps` | Customized right button (Touchable Component) props | Object | `null` | |
122+
| `selectTextOnFocus` | If `true`, all text will automatically be selected on focus. | Bool | `false` | |
123+
| `selectionColor` | The highlight and cursor color of the text input. | String | `null` | |
124+
| `step` | Value to increment or decrement the current spinner value | String<br>Number | `1` |
125+
| `type` | Type of spinner | String | `int` | Can be `int` or `real`/`float`... |
126+
| `value` | Controlled value of the Spinner | String<br>Number | `0` | |
122127

123128
#### Screenshots
124129

0 commit comments

Comments
 (0)