How to use the react-portal.defaultProps function in react-portal

To help you get started, we’ve selected a few react-portal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bcrumbs / reactackle / packages / reactackle-autoposition / src / AutoPosition.js View on Github external
type: 'inner',
  direction: 'horizontal',
  overflowMargin: -5,
  allowedShowByCenter: false,
  slidePriority: [
    'slideOnAdjacentEdge',
    'changeType',
    'slideOnOppositeEdge',
    'slideOnCurrentEdge',
  ],
  allowedSlideOnCurrentEdge: true,
  allowedSlideOnOppositeEdge: true,
  allowedSlideOnAdjacentEdge: false,
  allowedChangeType: false,
  onOverflow: noop,
  ...Portal.defaultProps,
};

let autoPositionInstances = [];

export default class AutoPosition extends Component {
  constructor(props) {
    super(props);

    this._domNode = null;

    this.state = {
      visible: props.visible,
      currentPosition: {
        top: null,
        left: null,
      },

react-portal

To make your life with React Portals easier.

MIT
Latest version published 3 years ago

Package Health Score

73 / 100
Full package analysis