Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always show tooltip #182

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
Using `npm` (use `--save` to include it in your package.json)

```bash
$ npm install react-rangeslider --save
$ npm install react-rangeslider-flex --save
```

Using `yarn` (this command also adds react-rangeslider to your package.json dependencies)
Using `yarn` (this command also adds react-rangeslider-flex to your package.json dependencies)

```bash
$ yarn add react-rangeslider
$ yarn add react-rangeslider-flex
```


Expand All @@ -47,27 +47,14 @@ With a module bundler like webpack that supports either CommonJS or ES2015 modul

```js
// Using an ES6 transpiler like Babel
import Slider from 'react-rangeslider'
import Slider from 'react-rangeslider-flex'

// To include the default styles
import 'react-rangeslider/lib/index.css'
import 'react-rangeslider-flex/lib/index.css'

// Not using an ES6 transpiler
var Slider = require('react-rangeslider')
```

The UMD build is also available on [unpkg][unpkg]:

```html
<script src="https://unpkg.com/react-rangeslider/umd/rangeslider.min.js"></script>
```

You can find the library on `window.ReactRangeslider`. Optionally you can drop in the default styles by adding the stylesheet.
```html
<link rel="stylesheet" href="https://unpkg.com/react-rangeslider/umd/rangeslider.min.css" />
```
Check out [docs & examples](https://whoisandy.github.io/react-rangeslider).

## Basic Example

```jsx
Expand Down Expand Up @@ -107,7 +94,7 @@ Rangeslider is bundled as a single component, that accepts data and callbacks on

### Component
```jsx
import Slider from 'react-rangeslider'
import Slider from 'react-rangeslider-flex'

// inside render
<Slider
Expand Down
2 changes: 1 addition & 1 deletion src/Rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class Slider extends Component {
const coords = this.coordinates(position)
const fillStyle = { [dimension]: `${coords.fill}px` }
const handleStyle = { [direction]: `${coords.handle}px` }
let showTooltip = tooltip && active
let showTooltip = tooltip

let labelItems = []
let labelKeys = Object.keys(labels)
Expand Down