aboutsummaryrefslogtreecommitdiff
path: root/src/components/Link.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-01 00:42:50 +0200
committerVendicated <vendicated@riseup.net>2022-10-01 00:42:50 +0200
commit8161a07dba401f04dac93f861e6b2cffe53ab7e3 (patch)
tree1499e825bcd6a162bc43507f492b262e9b1901ed /src/components/Link.tsx
parent9aaa47ea4e9ac068bf5fcbb997e31d722f43f1e5 (diff)
downloadVencord-8161a07dba401f04dac93f861e6b2cffe53ab7e3.tar.gz
Vencord-8161a07dba401f04dac93f861e6b2cffe53ab7e3.tar.bz2
Vencord-8161a07dba401f04dac93f861e6b2cffe53ab7e3.zip
Add in client updater, Notices API
Diffstat (limited to 'src/components/Link.tsx')
-rw-r--r--src/components/Link.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/components/Link.tsx b/src/components/Link.tsx
new file mode 100644
index 0000000..ef342d1
--- /dev/null
+++ b/src/components/Link.tsx
@@ -0,0 +1,19 @@
+import { React } from "../webpack/common";
+
+interface Props {
+ href: string;
+ disabled?: boolean;
+ style?: React.CSSProperties;
+}
+
+export function Link(props: React.PropsWithChildren<Props>) {
+ if (props.disabled) {
+ props.style ??= {};
+ props.style.pointerEvents = "none";
+ }
+ return (
+ <a href={props.href} target="_blank" style={props.style}>
+ {props.children}
+ </a>
+ );
+}