import { ArgsTable, Meta, Story, Canvas } from '@storybook/addon-docs';
import NumberInput from '.';
import { useState } from 'react';

<Meta title="表单/数字输入框 NumberInput" component={NumberInput} />

# 数字输入框 NumberInput

## 将废弃，不建议使用，建议使用 InputNumber

## 导入

```typescript
import { NumberInput } from '@ahri-ui/core';
```

## 基本使用

<Canvas>
  <Story name="基本使用">
    {() => {
      const [value, setValue] = useState();
      return (
        <NumberInput
          max={20}
          min={10}
          precision={2}
          suffix="%"
          value={value}
          onBlur={val => console.log('onBlur', val, typeof val)}
          onChange={val => {
            console.log(val, 'onChange');
            setValue(val);
          }}
        />
      );
    }}
  </Story>
</Canvas>

## 参数

<ArgsTable of={NumberInput} />
