aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorNico <nico@d3sox.me>2022-11-10 14:02:34 +0100
committerGitHub <noreply@github.com>2022-11-10 14:02:34 +0100
commit15f12073cf94dd9111bd67742705f0a9721f9424 (patch)
tree2ed90a873e500859c2a86fd9b56644d6f5dabd0b /src/components
parent58636a9a821614cc9fc55a78054f7a4f26a92ec9 (diff)
downloadVencord-15f12073cf94dd9111bd67742705f0a9721f9424.tar.gz
Vencord-15f12073cf94dd9111bd67742705f0a9721f9424.tar.bz2
Vencord-15f12073cf94dd9111bd67742705f0a9721f9424.zip
spotifyControls: make title/artists of local tracks unclickable (#201)
Co-authored-by: Vendicated <vendicated@riseup.net>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Link.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/components/Link.tsx b/src/components/Link.tsx
index 0965b64..2400ea6 100644
--- a/src/components/Link.tsx
+++ b/src/components/Link.tsx
@@ -18,19 +18,18 @@
import { React } from "../webpack/common";
-interface Props {
- href: string;
+interface Props extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
disabled?: boolean;
- style?: React.CSSProperties;
}
export function Link(props: React.PropsWithChildren<Props>) {
if (props.disabled) {
props.style ??= {};
props.style.pointerEvents = "none";
+ props["aria-disabled"] = true;
}
return (
- <a href={props.href} target="_blank" style={props.style}>
+ <a role="link" target="_blank" {...props}>
{props.children}
</a>
);