Skip to content

Commit

Permalink
Add fixed tootip example
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Delpoux committed Jul 3, 2015
1 parent 8d36036 commit 0dd6b8c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 1.0.3 - 2015-07-03

* Added: fixed tooltip example

## 1.0.2 - 2015-07-02

* Changed: tooltips exemple screenshot
* Changed: tooltips example screenshot

## 1.0.1 - 2015-07-02

Expand Down
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,31 @@ See [changelog](./CHANGELOG.md)

## Usage

### Exemple
### Examples

![Tooltip exemple](/screenshots/themed-tooltips.png)
![Tooltip example](/screenshots/themed-tooltips.png)

#### Fixed Tooltip

```js
import React from 'react'
import { Tooltip } from 'react-simple-tooltip'

export default class MyComponent {
render() {
return (
<div>
<Tooltip>
<div>react-simple-tooltip</div>
<div>By cedricdelpoux</div>
</Tooltip>
</div>
)
}
}
```

#### Hover Tooltip

```js
import React, { Component } from 'react'
Expand All @@ -45,8 +67,8 @@ export default class MyComponent extends Component {
{ this.state.tooltipTrigger
? (
<Tooltip placement="top" trigger={ this.state.tooltipTrigger }>
<div>Line 1</div>
<div>Line 2</div>
<div>react-simple-tooltip</div>
<div>By cedricdelpoux</div>
</Tooltip>
)
: null
Expand All @@ -64,9 +86,9 @@ export default class MyComponent extends Component {

### Props

* `placement`: String - one of ['top', 'right', 'bottom', 'left']
* `theme`: String - one of ['black', 'grey', 'blue', 'green', 'yellow', 'red']
* `trigger`: React element
* `placement`: String - by default is right - one of ['top', 'right', 'bottom', 'left']
* `theme`: String - by default is black - one of ['black', 'grey', 'blue', 'green', 'yellow', 'red']
* `trigger`: React element - by default is null

## Development

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-simple-tooltip",
"version": "1.0.2",
"version": "1.0.3",
"description": "A lightweight and simple tooltip component for React",
"repository": {
"type": "git",
Expand Down

0 comments on commit 0dd6b8c

Please sign in to comment.