bee-input-group-button
Advanced tools
Comparing version
{ | ||
"name": "bee-input-group-button", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "input-group-button ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,20 +6,40 @@ # bee-input-group-button | ||
InputGroupButton 作为FormControl的边按钮存在 | ||
react bee-input-group-button component for tinper-bee | ||
some description... | ||
## 使用 | ||
## 使用方法 | ||
使用单独的bee-input-group-button包 | ||
#### 组件引入 | ||
先进行下载bee-input-group-button包 | ||
``` | ||
npm install --save bee-input-group-button | ||
``` | ||
组件调用 | ||
```js | ||
import InputGroupButton from 'bee-input-group-button'; | ||
React.render(<div> | ||
<InputGroupButton/> | ||
</div>, document.getElementById('target')); | ||
``` | ||
#### 样式引入 | ||
- 可以使用link引入dist目录下bee-input-group-button.css | ||
``` | ||
<link rel="stylesheet" href="./node_modules/build/bee-input-group-button.css"> | ||
``` | ||
- 可以在js中import样式 | ||
```js | ||
import "./node_modules/src/InputGroupButton.scss" | ||
//或是 | ||
import "./node_modules/build/bee-input-group-button.css" | ||
``` | ||
## API | ||
|参数|说明|类型|默认值| | ||
|:--|:---:|:--:|---:| | ||
|---|----|---|------| | ||
#### 开发调试 | ||
@@ -26,0 +46,0 @@ |
import React from 'react'; | ||
import {shallow, mount, render} from 'enzyme'; | ||
import {expect} from 'chai'; | ||
import {expect} from 'chai'; | ||
import InputGroupButton from '../src/index'; | ||
describe('Enzyme Shallow', function () { | ||
it('InputGroupButton should be exist', function () { | ||
let inputGroupButton = shallow(<InputGroupButton/>); | ||
expect(inputGroupButton.length).to.equal(1); | ||
}); | ||
}); |
9706
9.98%92
9.52%52
62.5%15
-6.25%