bee-form-control

用 <FormControl>
来代替 <input>
, <textarea>
, and <select>
安装步骤
$ git clone https://github.com/tinper-bee/bee-form-control
$ cd bee-form-control
$ npm install
$ npm run dev
使用
使用单独的bee-form-control包
组件引入
先进行下载bee-form-control包
npm install --save bee-form-control
组件调用
import FormControl from 'bee-form-control';
React.render(<div>
<div>
<FormControl />
<br>
<FormControl placeholder="input placeholder" defaultValue="default value" />
<br/>
<FormControl type="checkbox" />
</div>
</div>, document.getElementById('target'));
样式引入
- 可以使用link引入dist目录下bee-form-control.css
<link rel="stylesheet" href="./node_modules/build/bee-form-control.css">
import "./node_modules/src/FormControl.scss"
import "./node_modules/build/bee-form-control.css"
API