Skip to content

Commit 0dd6b8c

Browse files
author
Cédric Delpoux
committed
Add fixed tootip example
1 parent 8d36036 commit 0dd6b8c

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22

3+
## 1.0.3 - 2015-07-03
4+
5+
* Added: fixed tooltip example
6+
37
## 1.0.2 - 2015-07-02
48

5-
* Changed: tooltips exemple screenshot
9+
* Changed: tooltips example screenshot
610

711
## 1.0.1 - 2015-07-02
812

README.md

+29-7
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,31 @@ See [changelog](./CHANGELOG.md)
1616

1717
## Usage
1818

19-
### Exemple
19+
### Examples
2020

21-
![Tooltip exemple](/screenshots/themed-tooltips.png)
21+
![Tooltip example](/screenshots/themed-tooltips.png)
22+
23+
#### Fixed Tooltip
24+
25+
```js
26+
import React from 'react'
27+
import { Tooltip } from 'react-simple-tooltip'
28+
29+
export default class MyComponent {
30+
render() {
31+
return (
32+
<div>
33+
<Tooltip>
34+
<div>react-simple-tooltip</div>
35+
<div>By cedricdelpoux</div>
36+
</Tooltip>
37+
</div>
38+
)
39+
}
40+
}
41+
```
42+
43+
#### Hover Tooltip
2244

2345
```js
2446
import React, { Component } from 'react'
@@ -45,8 +67,8 @@ export default class MyComponent extends Component {
4567
{ this.state.tooltipTrigger
4668
? (
4769
<Tooltip placement="top" trigger={ this.state.tooltipTrigger }>
48-
<div>Line 1</div>
49-
<div>Line 2</div>
70+
<div>react-simple-tooltip</div>
71+
<div>By cedricdelpoux</div>
5072
</Tooltip>
5173
)
5274
: null
@@ -64,9 +86,9 @@ export default class MyComponent extends Component {
6486

6587
### Props
6688

67-
* `placement`: String - one of ['top', 'right', 'bottom', 'left']
68-
* `theme`: String - one of ['black', 'grey', 'blue', 'green', 'yellow', 'red']
69-
* `trigger`: React element
89+
* `placement`: String - by default is right - one of ['top', 'right', 'bottom', 'left']
90+
* `theme`: String - by default is black - one of ['black', 'grey', 'blue', 'green', 'yellow', 'red']
91+
* `trigger`: React element - by default is null
7092

7193
## Development
7294

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-simple-tooltip",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "A lightweight and simple tooltip component for React",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)