From 3e3d05fc26a634b17549c9473bd8aeebb7dec4ec Mon Sep 17 00:00:00 2001 From: Manti <67705577+mantikafasi@users.noreply.github.com> Date: Sun, 28 May 2023 23:03:06 +0300 Subject: ReviewDB: Add Review Modal & Pagination (#1174) Co-authored-by: V --- src/webpack/common/components.ts | 3 ++- src/webpack/common/types/components.d.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/webpack') 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("Flex", ["Justify", "Align", "Wrap" export const ButtonWrapperClasses = findByPropsLazy("buttonWrapper", "buttonContent") as Record; 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; + +export type Paginator = ComponentType<{ + currentPage: number; + maxVisiblePages: number; + pageSize: number; + totalCount: number; + + onPageChange?(page: number): void; + hideMaxPage?: boolean; +}>; -- cgit