0.0.6 • Published 3 years ago

@ahwui/react-input v0.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

react input

基础input输入框封装。

安装

npm install --save @ahwui/react-input

引入

import Input from '@ahwui/react-input';

基本用法

import ReactDOM from 'react-dom';
import Input from '@ahwui/react-input';

ReactDOM.render(
  <div>
    <Input placeholder="请输入" defaultValue="张23" beforefix={
      <>图标</>
    } afterfix="个" />
  </div>,
  _mount_
);

Props

参数说明类型默认值
defaultValue输入框默认内容string--
size控件大小large / default / smalldefault
disabled是否禁用状态booleanfalse
beforefix设置前置内容React.ReactNode / string--
afterfix设置后置内容React.ReactNode / string--
onChange输入框内容变化时的回调function(str: string)--