docs: open prerequisite links in new tab (#11701)
This commit is contained in:
1 parent
a39830e269
commit
07e39609d9
2 files changed
+5
No files matched your search
@@ -33,6 +33,8 @@ export const PrerequisiteItem = ({
|
|||||||
position === "bottom" && "rounded-tl-docs_DEFAULT rounded-bl-docs_xl",
|
position === "bottom" && "rounded-tl-docs_DEFAULT rounded-bl-docs_xl",
|
||||||
!link && "cursor-text"
|
!link && "cursor-text"
|
||||||
)}
|
)}
|
||||||
|
target={link ? "_blank" : undefined}
|
||||||
|
rel={link ? "noopener noreferrer" : undefined}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
{link && "↗"}
|
{link && "↗"}
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ export const Prerequisites = ({ items }: PrerequisitesProps) => {
|
|||||||
<details
|
<details
|
||||||
open={!collapsed}
|
open={!collapsed}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
|
if (event.target instanceof HTMLAnchorElement) {
|
||||||
|
return
|
||||||
|
}
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}}
|
}}
|
||||||
onToggle={(event) => {
|
onToggle={(event) => {
|
||||||
|
|||||||
Reference in new issue
Block a user