aboutsummaryrefslogtreecommitdiff
path: root/src/webpack
diff options
context:
space:
mode:
authorManti <67705577+mantikafasi@users.noreply.github.com>2023-05-28 23:03:06 +0300
committerGitHub <noreply@github.com>2023-05-28 22:03:06 +0200
commit3e3d05fc26a634b17549c9473bd8aeebb7dec4ec (patch)
treea3591b0b0dea888f24d1ce8e58584b4447f62dde /src/webpack
parent6300198a5463ab38da81906bda634addf4c8a369 (diff)
downloadVencord-3e3d05fc26a634b17549c9473bd8aeebb7dec4ec.tar.gz
Vencord-3e3d05fc26a634b17549c9473bd8aeebb7dec4ec.tar.bz2
Vencord-3e3d05fc26a634b17549c9473bd8aeebb7dec4ec.zip
ReviewDB: Add Review Modal & Pagination (#1174)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/webpack')
-rw-r--r--src/webpack/common/components.ts3
-rw-r--r--src/webpack/common/types/components.d.ts10
2 files changed, 12 insertions, 1 deletions
diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts
index 8f59ac0..8b07b6c 100644
--- a/src/webpack/common/components.ts
+++ b/src/webpack/common/components.ts
@@ -43,6 +43,7 @@ export let ButtonLooks: t.ButtonLooks;
export let Popout: t.Popout;
export let Dialog: t.Dialog;
export let TabBar: any;
+export let Paginator: t.Paginator;
// token lagger real
/** css colour resolver stuff, no clue what exactly this does, just copied usage from Discord */
export let useToken: t.useToken;
@@ -53,6 +54,6 @@ export const Flex = waitForComponent<t.Flex>("Flex", ["Justify", "Align", "Wrap"
export const ButtonWrapperClasses = findByPropsLazy("buttonWrapper", "buttonContent") as Record<string, string>;
waitFor("FormItem", m => {
- ({ useToken, 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, Paginator } = m);
Forms = m;
});
diff --git a/src/webpack/common/types/components.d.ts b/src/webpack/common/types/components.d.ts
index 0b911f1..161e068 100644
--- a/src/webpack/common/types/components.d.ts
+++ b/src/webpack/common/types/components.d.ts
@@ -387,3 +387,13 @@ export type useToken = (color: {
css: string;
resolve: Resolve;
}) => ReturnType<Resolve>;
+
+export type Paginator = ComponentType<{
+ currentPage: number;
+ maxVisiblePages: number;
+ pageSize: number;
+ totalCount: number;
+
+ onPageChange?(page: number): void;
+ hideMaxPage?: boolean;
+}>;