mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
PermissionsViewer: add to simplified profiles
This commit is contained in:
parent
705da29df5
commit
6d4c9339dc
7 changed files with 140 additions and 6 deletions
|
@ -33,6 +33,7 @@ export let Card: t.Card;
|
|||
export let Button: t.Button;
|
||||
export let Switch: t.Switch;
|
||||
export let Tooltip: t.Tooltip;
|
||||
export let TooltipContainer: t.TooltipContainer;
|
||||
export let TextInput: t.TextInput;
|
||||
export let TextArea: t.TextArea;
|
||||
export let Text: t.Text;
|
||||
|
@ -66,6 +67,7 @@ waitFor(["FormItem", "Button"], m => {
|
|||
Button,
|
||||
FormSwitch: Switch,
|
||||
Tooltip,
|
||||
TooltipContainer,
|
||||
TextInput,
|
||||
TextArea,
|
||||
Text,
|
||||
|
|
44
src/webpack/common/types/components.d.ts
vendored
44
src/webpack/common/types/components.d.ts
vendored
|
@ -101,6 +101,28 @@ export type Tooltip = ComponentType<{
|
|||
|
||||
export type TooltipPositions = Record<"BOTTOM" | "CENTER" | "LEFT" | "RIGHT" | "TOP" | "WINDOW_CENTER", string>;
|
||||
|
||||
export type TooltipContainer = ComponentType<PropsWithChildren<{
|
||||
text: ReactNode;
|
||||
element?: "div" | "span";
|
||||
"aria-label"?: string | false;
|
||||
|
||||
delay?: number;
|
||||
/** Tooltip.Colors.BLACK */
|
||||
color?: string;
|
||||
/** TooltipPositions.TOP */
|
||||
position?: string;
|
||||
spacing?: number;
|
||||
|
||||
className?: string;
|
||||
tooltipClassName?: string | null;
|
||||
tooltipContentClassName?: string | null;
|
||||
|
||||
allowOverflow?: boolean;
|
||||
forceOpen?: boolean;
|
||||
hideOnClick?: boolean;
|
||||
disableTooltipPointerEvents?: boolean;
|
||||
}>>;
|
||||
|
||||
export type Card = ComponentType<PropsWithChildren<HTMLProps<HTMLDivElement> & {
|
||||
editable?: boolean;
|
||||
outline?: boolean;
|
||||
|
@ -110,6 +132,26 @@ export type Card = ComponentType<PropsWithChildren<HTMLProps<HTMLDivElement> & {
|
|||
Types: Record<"BRAND" | "CUSTOM" | "DANGER" | "PRIMARY" | "SUCCESS" | "WARNING", string>;
|
||||
};
|
||||
|
||||
export type ComboboxPopout = ComponentType<PropsWithChildren<{
|
||||
value: Set<any>;
|
||||
placeholder: string;
|
||||
children(query: string): ReactNode[];
|
||||
|
||||
onChange(value: any): void;
|
||||
itemToString?: (item: any) => string;
|
||||
onClose?(): void;
|
||||
|
||||
className?: string;
|
||||
listClassName?: string;
|
||||
|
||||
|
||||
autoFocus?: boolean;
|
||||
multiSelect?: boolean;
|
||||
maxVisibleItems?: number;
|
||||
showScrollbar?: boolean;
|
||||
|
||||
}>>;
|
||||
|
||||
export type Button = ComponentType<PropsWithChildren<Omit<HTMLProps<HTMLButtonElement>, "size"> & {
|
||||
/** Button.Looks.FILLED */
|
||||
look?: string;
|
||||
|
@ -375,7 +417,7 @@ export type Popout = ComponentType<{
|
|||
Animation: typeof PopoutAnimation;
|
||||
};
|
||||
|
||||
export type Dialog = ComponentType<PropsWithChildren<any>>;
|
||||
export type Dialog = ComponentType<JSX.IntrinsicElements["div"]>;
|
||||
|
||||
type Resolve = (data: { theme: "light" | "dark", saturation: number; }) => {
|
||||
hex(): string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue