GoScrobble/web/node_modules/reactstrap/es/PopperTargetHelper.js

15 lines
434 B
JavaScript

import PropTypes from 'prop-types';
import { getTarget, targetPropType } from './utils';
var PopperTargetHelper = function PopperTargetHelper(props, context) {
context.popperManager.setTargetNode(getTarget(props.target));
return null;
};
PopperTargetHelper.contextTypes = {
popperManager: PropTypes.object.isRequired
};
PopperTargetHelper.propTypes = {
target: targetPropType.isRequired
};
export default PopperTargetHelper;