Skip to content

Commit

Permalink
fix(boundariesElement): add DOMElement to allowed proptypes (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
seansfkelley authored and TheSharpieOne committed Sep 26, 2018
1 parent 205e80d commit cfe7318
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/lib/Components/PopoversPage.js
Expand Up @@ -31,7 +31,7 @@ export default class PopoversPage extends React.Component {
// callback for toggling isOpen in the controlling component
toggle: PropTypes.func,
// boundaries for popper, can be scrollParent, window, viewport, or any DOM element
boundariesElement: PropTypes.string,
boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),
target: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion docs/lib/Components/TooltipsPage.js
Expand Up @@ -31,7 +31,7 @@ export default class TooltipsPage extends React.Component {
<PrismCode className="language-jsx">
{`Tooltip.propTypes = {
// boundaries for popper, can be scrollParent, window, viewport, or any DOM element
boundariesElement: PropTypes.string,
boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),
// boolean to control the state of the tooltip
isOpen: PropTypes.bool,
hideArrow: PropTypes.bool,
Expand Down
4 changes: 2 additions & 2 deletions src/Popover.js
Expand Up @@ -2,13 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import PopperContent from './PopperContent';
import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType } from './utils';
import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType, DOMElement } from './utils';

const propTypes = {
placement: PropTypes.oneOf(PopperPlacements),
target: targetPropType.isRequired,
container: targetPropType,
boundariesElement: PropTypes.string,
boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),
isOpen: PropTypes.bool,
disabled: PropTypes.bool,
hideArrow: PropTypes.bool,
Expand Down
4 changes: 2 additions & 2 deletions src/PopperContent.js
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import { Arrow, Popper as ReactPopper } from 'react-popper';
import { getTarget, targetPropType, mapToCssModules } from './utils';
import { getTarget, targetPropType, mapToCssModules, DOMElement } from './utils';

const propTypes = {
children: PropTypes.node.isRequired,
Expand All @@ -21,7 +21,7 @@ const propTypes = {
container: targetPropType,
target: targetPropType.isRequired,
modifiers: PropTypes.object,
boundariesElement: PropTypes.string,
boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),
};

const defaultProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/Tooltip.js
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import PopperContent from './PopperContent';
import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType } from './utils';
import { getTarget, mapToCssModules, omit, PopperPlacements, targetPropType, DOMElement } from './utils';

const propTypes = {
placement: PropTypes.oneOf(PopperPlacements),
Expand All @@ -11,7 +11,7 @@ const propTypes = {
isOpen: PropTypes.bool,
disabled: PropTypes.bool,
hideArrow: PropTypes.bool,
boundariesElement: PropTypes.string,
boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),
className: PropTypes.string,
innerClassName: PropTypes.string,
arrowClassName: PropTypes.string,
Expand Down

0 comments on commit cfe7318

Please sign in to comment.