[TS] Fix alerts API types
This commit is contained in:
parent
5461065db8
commit
cfdee54d8e
3 changed files with 12 additions and 13 deletions
22
src/def.d.ts
vendored
22
src/def.d.ts
vendored
|
@ -63,22 +63,22 @@ export enum ButtonColors {
|
|||
}
|
||||
|
||||
interface ConfirmationAlertOptions {
|
||||
title: string | undefined;
|
||||
title?: string;
|
||||
content: string | JSX.Element | JSX.Element[];
|
||||
confirmText: string | undefined;
|
||||
confirmColor: ButtonColors | undefined;
|
||||
confirmText?: string;
|
||||
confirmColor?: ButtonColors;
|
||||
onConfirm: () => void;
|
||||
cancelText: string | undefined;
|
||||
cancelText?: string;
|
||||
}
|
||||
|
||||
interface InputAlertProps {
|
||||
title: string | undefined;
|
||||
confirmText: string | undefined;
|
||||
confirmColor: ButtonColors | undefined;
|
||||
onConfirm: (input: string) => void | Promise<void>;
|
||||
cancelText: string | undefined;
|
||||
placeholder: string | undefined;
|
||||
initialValue: string | undefined;
|
||||
title?: string;
|
||||
confirmText?: string;
|
||||
confirmColor?: ButtonColors;
|
||||
onConfirm: (input: string) => (void | Promise<void>);
|
||||
cancelText?: string;
|
||||
placeholder?: string;
|
||||
initialValue?: string;
|
||||
}
|
||||
|
||||
interface Author {
|
||||
|
|
|
@ -26,7 +26,6 @@ export default function InstallButton({ alertTitle, installFunction: fetchFuncti
|
|||
placeholder: "https://example.com/",
|
||||
onConfirm: (input: string) => fetchFunction(input),
|
||||
confirmText: "Install",
|
||||
confirmColor: undefined,
|
||||
cancelText: "Cancel"
|
||||
})
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ButtonColors, Theme } from "@types";
|
||||
import { ReactNative as RN, clipboard } from "@metro/common";
|
||||
import { clipboard } from "@metro/common";
|
||||
import { fetchTheme, removeTheme, selectTheme } from "@lib/themes";
|
||||
import { BundleUpdaterManager } from "@lib/native";
|
||||
import { getAssetIDByName } from "@ui/assets";
|
||||
|
|
Loading…
Reference in a new issue