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