diff --git a/src/def.d.ts b/src/def.d.ts
index 6bea4d2..36dcef4 100644
--- a/src/def.d.ts
+++ b/src/def.d.ts
@@ -5,6 +5,15 @@ import _Clipboard from "@react-native-clipboard/clipboard";
type MetroModules = { [id: number]: any };
+// Component types
+// TODO: Make these not be here?
+interface SummaryProps {
+ label: string;
+ icon?: string;
+ noPadding?: boolean;
+ children: JSX.Element | JSX.Element[];
+}
+
// Helper types for API functions
type PropIntellisense
= Record
& Record;
type PropsFinder = (...props: T[]) => PropIntellisense;
@@ -312,9 +321,12 @@ interface VendettaObject {
}
ui: {
components: {
+ // Discord
Forms: PropIntellisense<"Form" | "FormSection">;
General: PropIntellisense<"Button" | "Text" | "View">;
Search: _React.ComponentType;
+ // Vendetta
+ Summary: (props: SummaryProps) => JSX.Element;
}
toasts: {
showToast: (content: string, asset: number) => void;
diff --git a/src/ui/components/Summary.tsx b/src/ui/components/Summary.tsx
index 21a591a..cd46f46 100644
--- a/src/ui/components/Summary.tsx
+++ b/src/ui/components/Summary.tsx
@@ -1,3 +1,4 @@
+import { SummaryProps } from "@types";
import { getAssetIDByName } from "@ui/assets";
import { ReactNative as RN } from "@metro/common";
import { Forms } from "@ui/components";
@@ -5,13 +6,6 @@ import { Forms } from "@ui/components";
// TODO: Animated would be awesome
// TODO: Destructuring Forms doesn't work here. Why?
-interface SummaryProps {
- label: string;
- icon?: string;
- noPadding?: boolean;
- children: JSX.Element | JSX.Element[];
-}
-
export default function Summary({ label, icon, noPadding = false, children }: SummaryProps) {
const [hidden, setHidden] = React.useState(true);