From 17ba564bddfe8b3957d2d4c7c7b476e6397e35e9 Mon Sep 17 00:00:00 2001 From: vlad-ignatov Date: Sat, 29 Jul 2017 23:30:49 -0400 Subject: [PATCH] Documentation for 2.1.0 --- CHANGELOG.md | 2 +- README.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c7563..b3e56a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ 2.0.8 -------------------------------------------------------------------------------- -Fixed `React.PropTypes` reference warnings +* Fixed `React.PropTypes` reference warnings 2.0.7 -------------------------------------------------------------------------------- diff --git a/README.md b/README.md index 2e4a2b9..f9a3b84 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,13 @@ floating point numbers: ``` +#### Snap to step +If you want your component to "snap" to the closest step value while incrementing +or decrementing (up/down buttons or arrow keys) you can use the `snap` prop: +```jsx + +``` + #### Custom format By default the component displays the value number as is. However, you can provide your own `format` function that will be called with the numeric value @@ -73,6 +80,7 @@ Name | Type | Default **style** |`object` or `false` | none **size** |`number` or `string` | none **mobile** |`true`, `false`, 'auto' or `function`|`auto` +**snap** |`boolean` | none (false) Any other option is passed directly the input created by the component. Just don't forget to camelCase the attributes. For example `readonly` must be `readOnly`.