aboutsummaryrefslogtreecommitdiff
path: root/src/webpack
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-10 23:13:47 +0200
committerGitHub <noreply@github.com>2023-05-10 23:13:47 +0200
commit195f1a032fc63d4fd35564a9d11f8ed4afbcac4d (patch)
treea8dd4259905a6bcc9ac680045fee00229db89cf5 /src/webpack
parentdfda9e7f846476cd0b699519ba8f5c36a4ac3685 (diff)
downloadVencord-195f1a032fc63d4fd35564a9d11f8ed4afbcac4d.tar.gz
Vencord-195f1a032fc63d4fd35564a9d11f8ed4afbcac4d.tar.bz2
Vencord-195f1a032fc63d4fd35564a9d11f8ed4afbcac4d.zip
ShowConnections: Add verified & copy/link icons in tooltip (#1092)
Diffstat (limited to 'src/webpack')
-rw-r--r--src/webpack/common/components.ts5
-rw-r--r--src/webpack/common/types/components.d.ts12
2 files changed, 16 insertions, 1 deletions
diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts
index 97816bf..8f59ac0 100644
--- a/src/webpack/common/components.ts
+++ b/src/webpack/common/components.ts
@@ -43,6 +43,9 @@ export let ButtonLooks: t.ButtonLooks;
export let Popout: t.Popout;
export let Dialog: t.Dialog;
export let TabBar: any;
+// token lagger real
+/** css colour resolver stuff, no clue what exactly this does, just copied usage from Discord */
+export let useToken: t.useToken;
export const Timestamp = waitForComponent<t.Timestamp>("Timestamp", filters.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format"));
export const Flex = waitForComponent<t.Flex>("Flex", ["Justify", "Align", "Wrap"]);
@@ -50,6 +53,6 @@ export const Flex = waitForComponent<t.Flex>("Flex", ["Justify", "Align", "Wrap"
export const ButtonWrapperClasses = findByPropsLazy("buttonWrapper", "buttonContent") as Record<string, string>;
waitFor("FormItem", m => {
- ({ Card, Button, FormSwitch: Switch, Tooltip, TextInput, TextArea, Text, Select, SearchableSelect, Slider, ButtonLooks, TabBar, Popout, Dialog } = m);
+ ({ useToken, Card, Button, FormSwitch: Switch, Tooltip, TextInput, TextArea, Text, Select, SearchableSelect, Slider, ButtonLooks, TabBar, Popout, Dialog } = m);
Forms = m;
});
diff --git a/src/webpack/common/types/components.d.ts b/src/webpack/common/types/components.d.ts
index 835de79..0b911f1 100644
--- a/src/webpack/common/types/components.d.ts
+++ b/src/webpack/common/types/components.d.ts
@@ -375,3 +375,15 @@ export type Popout = ComponentType<{
};
export type Dialog = ComponentType<PropsWithChildren<any>>;
+
+type Resolve = (data: { theme: "light" | "dark", saturation: number; }) => {
+ hex(): string;
+ hsl(): string;
+ int(): number;
+ spring(): string;
+};
+
+export type useToken = (color: {
+ css: string;
+ resolve: Resolve;
+}) => ReturnType<Resolve>;