Skip to content

Commit a301d41

Browse files
authored
Update README.md
1 parent e8ef969 commit a301d41

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
[download-image]: https://img.shields.io/npm/dm/react-tooltip.svg?style=flat-square
88
[download-url]: https://npmjs.org/package/react-tooltip
99

10-
### Installation
10+
## Installation
1111

1212
```sh
1313
npm install react-tooltip
1414
```
1515

16-
### Usage
16+
## Usage
1717
**Using NPM**
1818

1919
1 . Require react-tooltip after installation
@@ -37,7 +37,7 @@ var ReactTooltip = require("react-tooltip")
3737

3838
You can import `node_modules/react-tooltip/standalone/react-tooltip.min.js` into your page, please make sure that you have already imported `react` and `react-dom` into your page.
3939

40-
### Options
40+
## Options
4141
Notes:
4242
* The tooltip is using `type: dark` `place: top` `effect: float` as **default** attribute, you don't have to add these options if you don't want to change default
4343
* The option you set on `<ReactTooltip />` component will be implemented on every tooltip in a same page: `<ReactTooltip effect="solid" />`
@@ -62,22 +62,25 @@ class | data-class | String | | extra custom class, can use !important to
6262
delayShow | data-delay-show | Number | | `<p data-tip="tooltip" data-delay-show='1000'></p>` or `<ReactTooltip delayShow={1000} />`
6363
border | data-border | Bool | true, false | Add one pixel white border
6464

65-
### Using react component as tooltip
65+
## Using react component as tooltip
6666
Check the example [React-tooltip Test](http://wwayne.com/react-tooltip)
6767

6868
##### Note:
6969
1. **data-tip** is necessary, because `<ReactTooltip />` find tooltip via this attribute
7070
2. **data-for** correspond to the **id** of `<ReactTooltip />`
7171
3. When using react component as tooltip, you can have many `<ReactTooltip />` in a page but they should have different **id**
7272

73-
### Static Methods
73+
## Static Methods
7474
`ReactTooltip.hide()`: Hide the tooltip manually
7575

7676
`ReactTooltip.rebuild()`: Rebinding tooltip to the corresponding elements
7777

7878
I suggest always put `<ReactTooltip />` in the Highest level or smart component of Redux, so you might need these static
7979
method to control tooltip's behaviour in some situations
8080

81+
## Article
82+
[How I insert sass into react component](https://medium.com/@wwayne_me/how-i-insert-sass-into-my-npm-react-component-b46b9811c226#.gi4hxu44a)
83+
8184
### License
8285

8386
MIT

0 commit comments

Comments
 (0)