BlueWallet/components/types.ts
Marcos Rodriguez Velez eee51285ed
DEL: DRY
2024-06-17 15:57:13 -04:00

49 lines
1.2 KiB
TypeScript

import { AccessibilityRole, ViewStyle } from 'react-native';
export interface Action {
id: string | number;
text: string;
icon?: {
iconValue: string;
};
menuTitle?: string;
menuStateOn?: boolean;
disabled?: boolean;
displayInline?: boolean;
}
export interface ToolTipMenuProps {
actions: Action[] | Action[][];
children: React.ReactNode;
enableAndroidRipple?: boolean;
dismissMenu?: () => void;
onPressMenuItem: (id: string) => void;
title?: string;
isMenuPrimaryAction?: boolean;
isButton?: boolean;
renderPreview?: () => React.ReactNode;
onPress?: () => void;
previewValue?: string;
accessibilityRole?: AccessibilityRole;
disabled?: boolean;
testID?: string;
style?: ViewStyle | ViewStyle[];
accessibilityLabel?: string;
accessibilityHint?: string;
buttonStyle?: ViewStyle | ViewStyle[];
onMenuWillShow?: () => void;
onMenuWillHide?: () => void;
}
export enum HandOffActivityType {
ReceiveOnchain = 'io.bluewallet.bluewallet.receiveonchain',
Xpub = 'io.bluewallet.bluewallet.xpub',
ViewInBlockExplorer = 'io.bluewallet.bluewallet.blockexplorer',
}
export interface HandOffComponentProps {
url?: string;
title?: string;
type: HandOffActivityType;
userInfo?: object;
}