forgot this
This commit is contained in:
parent
2429c283aa
commit
eeb4d26812
|
@ -28,7 +28,7 @@ import { Margins } from "@utils/margins";
|
|||
import { classes } from "@utils/misc";
|
||||
import { showItemInFolder } from "@utils/native";
|
||||
import { useAwaiter } from "@utils/react";
|
||||
import { findByProps, findComponent } from "@webpack";
|
||||
import { findByProps, findComponentByFields } from "@webpack";
|
||||
import { Card, Forms, React, showToast, TabBar, TextArea, useEffect, useRef, useState } from "@webpack/common";
|
||||
import type { Ref, SyntheticEvent } from "react";
|
||||
|
||||
|
@ -45,7 +45,7 @@ type FileInputProps = {
|
|||
filters?: { name?: string; extensions: string[]; }[];
|
||||
};
|
||||
|
||||
const FileInput = findComponent<FileInputProps>(m => m.prototype?.activateUploadDialogue && m.prototype.setRef);
|
||||
const FileInput = findComponentByFields<FileInputProps>("activateUploadDialogue", "setRef");
|
||||
const TextAreaProps = findByProps("textarea");
|
||||
|
||||
const cl = classNameFactory("vc-settings-theme-");
|
||||
|
|
|
@ -92,10 +92,13 @@ function makeShortcuts() {
|
|||
findAll: cacheFindAll,
|
||||
findByProps,
|
||||
findAllByProps: (...props: string[]) => cacheFindAll(filters.byProps(...props)),
|
||||
findProp: (...props: string[]) => findByProps(...props)[props[0]],
|
||||
findByCode: newFindWrapper(filters.byCode),
|
||||
findAllByCode: (code: string) => cacheFindAll(filters.byCode(code)),
|
||||
findComponentByCode: newFindWrapper(filters.componentByCode),
|
||||
findAllComponentsByCode: (...code: string[]) => cacheFindAll(filters.componentByCode(...code)),
|
||||
findComponentByFields: newFindWrapper(filters.componentByFields),
|
||||
findAllComponentsByFields: (...fields: string[]) => cacheFindAll(filters.componentByFields(...fields)),
|
||||
findExportedComponent: (...props: string[]) => findByProps(...props)[props[0]],
|
||||
findStore: newFindWrapper(filters.byStoreName),
|
||||
findByFactoryCode: newFindWrapper(filters.byFactoryCode),
|
||||
|
|
Loading…
Reference in a new issue