Skip to content

Commit 43c8672

Browse files
committed
Export PointTarget at the top level
1 parent fedfbbc commit 43c8672

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Then with a module bundler like [webpack](https://webpack.github.io/), use as yo
2020

2121
```js
2222
// using an ES6 transpiler, like babel
23-
import { PointTarget } from 'react-point'
23+
import PointTarget from 'react-point'
2424

2525
// not using an ES6 transpiler
26-
var PointTarget = require('react-point').PointTarget
26+
var PointTarget = require('react-point')
2727
```
2828

2929
The UMD build is also available on [npmcdn](https://npmcdn.com):
@@ -40,7 +40,7 @@ Just render a `<PointTarget>` component and give it an `onPoint` function to cal
4040

4141
```js
4242
import React from 'react'
43-
import { PointTarget } from 'react-point'
43+
import PointTarget from 'react-point'
4444

4545
class App extends React.Component {
4646
handlePoint() {
@@ -59,7 +59,7 @@ By default, a `<PointTarget>` renders a `<button>` for accessibility. However, y
5959

6060
```js
6161
import React from 'react'
62-
import { PointTarget } from 'react-point'
62+
import PointTarget from 'react-point'
6363

6464
class App extends React.Component {
6565
handlePoint() {

modules/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
export PointTarget from './PointTarget'
1+
/* eslint-env node */
2+
import PointTarget from './PointTarget'
3+
4+
// TODO: Remove in next major release.
5+
PointTarget.PointTarget = PointTarget
6+
7+
module.exports = PointTarget

0 commit comments

Comments
 (0)