bee-input-group
v2.0.4
Published
input-group ui component for react
Downloads
276
Readme
bee-input-group
InputGroup 是包装 FormControl
InputGroupButton
InputGroupAddon
的元素,实际应用中 InputGroupAddon
InputGroupButton
被集成到InputGroup中使用,格式如:InputGroup.Addon
InputGroup.Button
。
使用
使用单独的bee-input-group包
组件引入
先进行下载bee-input-group包
npm install --save bee-input-group
组件调用
import InputGroup from 'bee-input-group';
import Button from 'bee-button'
React.render(<div>
<InputGroup>
<InputGroup.Addon>.00</InputGroup.Addon>
<FormControl type="text" />
</InputGroup>
<InputGroup>
<InputGroup.Button>
<Button>toggle</Button>
</InputGroup.Button>
<FormControl type="text" />
</InputGroup>
</div>, document.getElementById('target'));
样式引入
- 可以使用link引入dist目录下bee-input-group.css
<link rel="stylesheet" href="./node_modules/build/bee-input-group.css">
- 可以在js中import样式
import "./node_modules/src/InputGroup.scss"
//或是
import "./node_modules/build/bee-input-group.css"
开发调试
$ git clone https://github.com/tinper-bee/bee-input-group
$ cd bee-input-group
$ npm install
$ npm run dev