Skip to content
Merged
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
1 change: 0 additions & 1 deletion packages/flowtip-react-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"prepare": "npm run clean && npm run copy && npm run build"
},
"dependencies": {
"fbjs": "^0.8.12",
"flowtip-core": "^5.0.0",
"react-resize-observer": "^0.2.0"
},
Expand Down
28 changes: 3 additions & 25 deletions packages/flowtip-react-dom/src/FlowTip.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import * as React from 'react';
import {findDOMNode} from 'react-dom';
import ResizeObserver from 'react-resize-observer';
import invariant from 'fbjs/lib/invariant';

import flowtip, {
RIGHT,
Expand All @@ -15,22 +14,8 @@ import flowtip, {

import type {RectLike, Region, Align, Dimensions, Result} from 'flowtip-core';

import singleWarning from './util/singleWarning';
import getContainingBlock from './util/getContainingBlock';

const REMOVED_PROPS = [
'anchor',
'width',
'height',
'offset',
'clamp',
'rotationOffset',
'targetAlign',
'targetAlignOffset',
'rootAlign',
'rootAlignOffset',
'hideInDisabledRegions',
];
// Static `flowtip` layout calculation result mock for use during initial client
// side render or on server render where DOM feedback is not possible.
const STATIC_RESULT: Result = {
Expand Down Expand Up @@ -166,15 +151,6 @@ class FlowTip extends React.Component<Props, State> {
// ===========================================================================
// Lifecycle Methods.
// ===========================================================================
componentWillMount(): void {
REMOVED_PROPS.forEach((prop) => singleWarning(
`${prop}_deprecated`,
!this.props.hasOwnProperty(prop),
'React FlowTip `%s` prop is has been removed in this version.',
prop,
));
}

componentDidMount(): void {
this._isMounted = true;

Expand Down Expand Up @@ -463,7 +439,9 @@ class FlowTip extends React.Component<Props, State> {
} else {
// Refine nullable `document.body`.
// see: https://stackoverflow.com/questions/42377663
invariant(document.body !== null, 'document.body is null');
if (document.body === null) {
throw new Error('document.body is null');
}
this._containingBlockNode = document.body;
}
}
Expand Down
11 changes: 0 additions & 11 deletions packages/flowtip-react-dom/src/util/singleWarning.js

This file was deleted.