Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Popper] Fix links to popper.js #20464

Merged
merged 3 commits into from
Apr 8, 2020
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
8 changes: 4 additions & 4 deletions docs/pages/api-docs/popper.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ import { Popper } from '@material-ui/core';

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).

Poppers rely on the 3rd party library [Popper.js](https://github.com/FezVrasta/popper.js) for positioning.
Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.



## Props

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">anchorEl</span> | <span class="prop-type">object<br>&#124;&nbsp;func</span> | | This is the reference element, or a function that returns the reference element, that may be used to set the position of the popover. The return value will passed as the reference object of the Popper instance.<br>The reference element should be an HTML Element instance or a referenceObject: https://popper.js.org/popper-documentation.html#referenceObject. |
| <span class="prop-name">anchorEl</span> | <span class="prop-type">object<br>&#124;&nbsp;func</span> | | This is the reference element, or a function that returns the reference element, that may be used to set the position of the popover. The return value will passed as the reference object of the Popper instance.<br>The reference element should be an HTML Element instance or a [referenceObject](https://popper.js.org/docs/v1/#referenceObject). |
| <span class="prop-name required">children&nbsp;*</span> | <span class="prop-type">node<br>&#124;&nbsp;func</span> | | Popper render function or node. |
| <span class="prop-name">container</span> | <span class="prop-type">object<br>&#124;&nbsp;func</span> | | A node, component instance, or function that returns either. The `container` will passed to the Modal component. By default, it uses the body of the anchorEl's top-level document object, so it's simply `document.body` most of the time. |
| <span class="prop-name">disablePortal</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Disable the portal behavior. The children stay within it's parent DOM hierarchy. |
| <span class="prop-name">keepMounted</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Always keep the children in the DOM. This prop can be useful in SEO situation or when you want to maximize the responsiveness of the Popper. |
| <span class="prop-name">modifiers</span> | <span class="prop-type">object</span> | | Popper.js is based on a "plugin-like" architecture, most of its features are fully encapsulated "modifiers".<br>A modifier is a function that is called each time Popper.js needs to compute the position of the popper. For this reason, modifiers should be very performant to avoid bottlenecks. To learn how to create a modifier, [read the modifiers documentation](https://github.com/FezVrasta/popper.js/blob/master/docs/_includes/popper-documentation.md#modifiers--object). |
| <span class="prop-name">modifiers</span> | <span class="prop-type">object</span> | | Popper.js is based on a "plugin-like" architecture, most of its features are fully encapsulated "modifiers".<br>A modifier is a function that is called each time Popper.js needs to compute the position of the popper. For this reason, modifiers should be very performant to avoid bottlenecks. To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v1/#modifiers). |
| <span class="prop-name required">open&nbsp;*</span> | <span class="prop-type">bool</span> | | If `true`, the popper is visible. |
| <span class="prop-name">placement</span> | <span class="prop-type">'bottom-end'<br>&#124;&nbsp;'bottom-start'<br>&#124;&nbsp;'bottom'<br>&#124;&nbsp;'left-end'<br>&#124;&nbsp;'left-start'<br>&#124;&nbsp;'left'<br>&#124;&nbsp;'right-end'<br>&#124;&nbsp;'right-start'<br>&#124;&nbsp;'right'<br>&#124;&nbsp;'top-end'<br>&#124;&nbsp;'top-start'<br>&#124;&nbsp;'top'</span> | <span class="prop-default">'bottom'</span> | Popper placement. |
| <span class="prop-name">popperOptions</span> | <span class="prop-type">object</span> | <span class="prop-default">{}</span> | Options provided to the [`popper.js`](https://github.com/FezVrasta/popper.js) instance. |
| <span class="prop-name">popperOptions</span> | <span class="prop-type">object</span> | <span class="prop-default">{}</span> | Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance. |
| <span class="prop-name">popperRef</span> | <span class="prop-type">ref</span> | | A ref that points to the used popper instance. |
| <span class="prop-name">transition</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Help supporting a react-transition-group/Transition component. |

Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Popper/Popper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface PopperProps extends React.HTMLAttributes<HTMLDivElement> {
}

/**
* Poppers rely on the 3rd party library [Popper.js](https://github.com/FezVrasta/popper.js) for positioning.
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.
* Demos:
*
* - [Autocomplete](https://material-ui.com/components/autocomplete/)
Expand Down
13 changes: 6 additions & 7 deletions packages/material-ui/src/Popper/Popper.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect
const defaultPopperOptions = {};

/**
* Poppers rely on the 3rd party library [Popper.js](https://github.com/FezVrasta/popper.js) for positioning.
* Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.
*/
const Popper = React.forwardRef(function Popper(props, ref) {
const {
Expand Down Expand Up @@ -232,8 +232,7 @@ Popper.propTypes = {
* The return value will passed as the reference object of the Popper
* instance.
*
* The reference element should be an HTML Element instance or a referenceObject:
* https://popper.js.org/popper-documentation.html#referenceObject.
* The reference element should be an HTML Element instance or a [referenceObject](https://popper.js.org/docs/v1/#referenceObject).
*/
anchorEl: chainPropTypes(PropTypes.oneOfType([PropTypes.object, PropTypes.func]), (props) => {
if (props.open) {
Expand Down Expand Up @@ -267,8 +266,8 @@ Popper.propTypes = {
return new Error(
[
'Material-UI: the `anchorEl` prop provided to the component is invalid.',
'It should be an HTML Element instance or a referenceObject:',
'https://popper.js.org/popper-documentation.html#referenceObject.',
'It should be an HTML Element instance or a referenceObject ',
'(https://popper.js.org/docs/v1/#referenceObject).',
].join('\n'),
);
}
Expand Down Expand Up @@ -305,7 +304,7 @@ Popper.propTypes = {
* A modifier is a function that is called each time Popper.js needs to
* compute the position of the popper.
* For this reason, modifiers should be very performant to avoid bottlenecks.
* To learn how to create a modifier, [read the modifiers documentation](https://github.com/FezVrasta/popper.js/blob/master/docs/_includes/popper-documentation.md#modifiers--object).
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v1/#modifiers).
*/
modifiers: PropTypes.object,
/**
Expand All @@ -330,7 +329,7 @@ Popper.propTypes = {
'top',
]),
/**
* Options provided to the [`popper.js`](https://github.com/FezVrasta/popper.js) instance.
* Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance.
*/
popperOptions: PropTypes.object,
/**
Expand Down