mirror of
https://github.com/bendtherules/UiQuestions.git
synced 2026-08-18 22:02:42 +00:00
Rename Link to InternalLink and change usage
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const Link = ({ hash, title }) => {
|
const InternalLink = ({ hash, title }) => {
|
||||||
const handleLink = (event) => {
|
const handleLink = (event) => {
|
||||||
//manually change hash to trigger hashChange event.
|
//manually change hash to trigger hashChange event.
|
||||||
window.location.hash = "#";
|
window.location.hash = "#";
|
||||||
@@ -14,4 +14,4 @@ const Link = ({ hash, title }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Link;
|
export default InternalLink;
|
||||||
@@ -7,7 +7,7 @@ slug: /
|
|||||||
|
|
||||||
import Admonition from "../components/Admonition"
|
import Admonition from "../components/Admonition"
|
||||||
import Accordion from "../components/Accordion"
|
import Accordion from "../components/Accordion"
|
||||||
import Link from "../components/Link"
|
import InternalLink from "../components/InternalLink"
|
||||||
import MDN from "../components/MDNBadge"
|
import MDN from "../components/MDNBadge"
|
||||||
|
|
||||||
:::note DOM interfaces
|
:::note DOM interfaces
|
||||||
@@ -66,7 +66,7 @@ for (let p of paras) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`querySelectorAll` is also available on <b>Element</b> and <b>DocumentFragment</b>, in the <Link title = "same way as querySelector" hash = "link-element-has-qs"/>.
|
`querySelectorAll` is also available on <b>Element</b> and <b>DocumentFragment</b>, in the <InternalLink title = "same way as querySelector" hash = "link-element-has-qs"/>.
|
||||||
|
|
||||||
<MDN title="querySelectorAll" url="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll" />
|
<MDN title="querySelectorAll" url="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user