Skip to content

Commit

Permalink
Merge pull request ReactTooltip#491 from k88manish/master
Browse files Browse the repository at this point in the history
docs: Spelling mistakes correction
  • Loading branch information
aronhelser authored May 6, 2019
2 parents a2e8af5 + cb9d2e5 commit 34fa8cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/decorators/staticMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import CONSTANT from '../constant'

const dispatchGlobalEvent = (eventName, opts) => {
// Compatibale with IE
// Compatible with IE
// @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work
let event

Expand Down
2 changes: 1 addition & 1 deletion src/decorators/trackRemoval.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Tracking target removing from DOM.
* It's nessesary to hide tooltip when it's target disappears.
* It's necessary to hide tooltip when it's target disappears.
* Otherwise, the tooltip would be shown forever until another target
* is triggered.
*
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import PropTypes from 'prop-types'
import classname from 'classnames'

/* Decoraters */
/* Decorators */
import staticMethods from './decorators/staticMethods'
import windowListener from './decorators/windowListener'
import customEvent from './decorators/customEvent'
Expand Down Expand Up @@ -246,8 +246,8 @@ class ReactTooltip extends React.Component {
}

/**
* Invoke this before bind listener and ummount the compont
* it is necessary to invloke this even when binding custom event
* Invoke this before bind listener and unmount the component
* it is necessary to invoke this even when binding custom event
* so that the tooltip can switch between custom and default listener
*/
unbindBasicListener (target) {
Expand Down Expand Up @@ -366,7 +366,7 @@ class ReactTooltip extends React.Component {
}

/**
* When mouse hover, updatetooltip
* When mouse hover, update tool tip
*/
updateTooltip (e) {
const {delayShow, disable} = this.state
Expand Down Expand Up @@ -464,7 +464,7 @@ class ReactTooltip extends React.Component {
}

/**
* Add scroll eventlistener when tooltip show
* Add scroll event listener when tooltip show
* automatically hide the tooltip when scrolling
*/
addScrollListener (currentTarget) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getTipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import React from 'react'
export default function (tip, children, getContent, multiline) {
if (children) return children
if (getContent !== undefined && getContent !== null) return getContent // getContent can be 0, '', etc.
if (getContent === null) return null // Tip not exist and childern is null or undefined
if (getContent === null) return null // Tip not exist and children is null or undefined

const regexp = /<br\s*\/?>/
if (!multiline || multiline === 'false' || !regexp.test(tip)) {
Expand Down

0 comments on commit 34fa8cb

Please sign in to comment.