Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 874 Bytes

File metadata and controls

53 lines (36 loc) · 874 Bytes
Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 10
---
hero:
  title: @rc-component/input-number
  description: React InputNumber Component
---

Install

# npm
npm install --save @rc-component/input-number

# yarn
yarn install @rc-component/input-number

Usage

import InputNumber from '@rc-component/input-number';

export default () => <InputNumber defaultValue={10} />;

Development

npm install
npm start

Keyboard Navigation

  • When you hit the ⬆ or ⬇ key, the input value will be increased or decreased by step
  • With the Shift key (Shift+⬆, Shift+⬇), the input value will be changed by 10 * step
  • With the Ctrl or ⌘ key (Ctrl+⬆ or ⌘+⬆ or Ctrl+⬇ or ⌘+⬇ ), the input value will be changed by 0.1 * step

Test Case

npm test

Coverage

npm run coverage

License

@rc-component/input-number is released under the MIT license.