mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
Add Spinner component
Co-Authored-By: Kyuuhachi <caagr98@gmail.com>
This commit is contained in:
parent
f20de977b3
commit
754802e212
2 changed files with 24 additions and 1 deletions
|
@ -49,6 +49,8 @@ export let ScrollerThin: t.ScrollerThin;
|
|||
export let Clickable: t.Clickable;
|
||||
export let Avatar: t.Avatar;
|
||||
export let FocusLock: t.FocusLock;
|
||||
export let Spinner: t.Spinner;
|
||||
export let SpinnerType: t.SpinnerType;
|
||||
// token lagger real
|
||||
/** css colour resolver stuff, no clue what exactly this does, just copied usage from Discord */
|
||||
export let useToken: t.useToken;
|
||||
|
@ -82,7 +84,9 @@ waitFor(["FormItem", "Button"], m => {
|
|||
Clickable,
|
||||
Avatar,
|
||||
FocusLock,
|
||||
Heading
|
||||
Heading,
|
||||
Spinner,
|
||||
SpinnerType,
|
||||
} = m);
|
||||
Forms = m;
|
||||
});
|
||||
|
|
19
src/webpack/common/types/components.d.ts
vendored
19
src/webpack/common/types/components.d.ts
vendored
|
@ -502,3 +502,22 @@ export type Avatar = ComponentType<PropsWithChildren<{
|
|||
type FocusLock = ComponentType<PropsWithChildren<{
|
||||
containerRef: RefObject<HTMLElement>;
|
||||
}>>;
|
||||
|
||||
export declare enum SpinnerType {
|
||||
WANDERING_CUBES = "wanderingCubes",
|
||||
CHASING_DOTS = "chasingDots",
|
||||
PULSING_ELLIPSIS = "pulsingEllipsis",
|
||||
SPINNING_CIRCLE = "spinningCircle",
|
||||
SPINNING_CIRCLE_SIMPLE = "spinningCircleSimple",
|
||||
LOW_MOTION = "lowMotion",
|
||||
}
|
||||
|
||||
export type Spinner = ComponentType<{
|
||||
type?: SpinnerType;
|
||||
animated?: boolean;
|
||||
className?: string;
|
||||
itemClassName?: string;
|
||||
"aria-label"?: string;
|
||||
}> & {
|
||||
Type: typeof SpinnerType;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue