How to use the @instructure/ui-position.PositionPropTypes.mountNode function in @instructure/ui-position

To help you get started, we’ve selected a few @instructure/ui-position 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 instructure / instructure-ui / packages / ui-popover / src / Popover / index.js View on Github external
offsetY: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
    /**
     * The parent in which to constrain the popover.
     * One of: 'window', 'scroll-parent', 'parent', 'none', an element,
     * or a function returning an element
     */
    constrain: PositionPropTypes.constrain,
    /**
     * Target element for positioning the Popover (if it differs from the trigger)
     */
    positionTarget: PropTypes.oneOfType([element, PropTypes.func]),
    /**
     * An element or a function returning an element to use as the mount node
     * for the `` (defaults to `document.body`)
     */
    mountNode: PositionPropTypes.mountNode,
    /**
     * Insert the element at the 'top' of the mountNode or at the 'bottom'
     */
    insertAt: PropTypes.oneOf(['bottom', 'top']),
    /**
     * An element, function returning an element, or array of elements that will
     * not be hidden from the screen reader when the `` is open
     */
    liveRegion: PropTypes.oneOfType([
      PropTypes.arrayOf(PropTypes.element),
      PropTypes.element,
      PropTypes.func
    ]),
    /**
    * An id is generated if not supplied.
    */
github instructure / instructure-ui / packages / ui-layout / src / Position / index.js View on Github external
/**
     * Callback fired when `` content has been mounted and is initially positioned
     */
    onPositioned: PropTypes.func,

    /**
     * Whether or not position of the target should be tracked or just set statically on render
     */
    trackPosition: PropTypes.bool,

    /**
     * An element or a function returning an element to use as the mount node
     * for the `` (defaults to `document.body`)
     */
    mountNode: PositionPropTypes.mountNode,

    /**
     * Insert the element at the 'top' of the mountNode or at the 'bottom'
     */
    insertAt: PropTypes.oneOf(['bottom', 'top']),

    /**
     * The parent in which to constrain the placement.
     * One of: 'window', 'scroll-parent', 'parent', 'none', an element,
     * or a function returning an element
     */
    constrain: PositionPropTypes.constrain,
    id: PropTypes.string
  }

  static defaultProps = {
github instructure / instructure-ui / packages / ui-menu / src / Menu / index.js View on Github external
* Callback fired on the onKeyUp of the `<menu>`
     */
    onKeyUp: PropTypes.func,
    /*
     * A function that returns a reference to the `<menu>`
     */
    menuRef: PropTypes.func,
    /**
     * A function that returns a reference to the ``
     */
    popoverRef: PropTypes.func,
    /**
     * If a trigger is supplied, an element or a function returning an element to use as the mount node
     * for the `<menu>` (defaults to `document.body`)
     */
    mountNode: PositionPropTypes.mountNode,
    /**
     * The parent in which to constrain the menu.
     * One of: 'window', 'scroll-parent', 'parent', 'none', an element,
     * or a function returning an element
     */
    constrain: PositionPropTypes.constrain,
    /**
     * If a trigger is supplied, an element, function returning an element, or array of elements that will not
     * be hidden from the screen reader when the `<menu>` is open
     */
    liveRegion: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.func]),
    /**
     * If a trigger is supplied, should the `<menu>` hide when an item is selected
     */
    shouldHideOnSelect: PropTypes.bool,
    /**</menu></menu></menu></menu></menu>