import type {StyleProp, TextInputProps, TextStyle} from 'react-native'; import type {IconProp} from '../../../types'; export type Icon = 'error' | 'info' | 'success' | 'question'; export type Button = { text: string; textStyle?: StyleProp; onPress?: () => void; }; export type PromptData = { title: string; cancelColorText?: string; cancelText?: string; confirmColorText?: string; confirmText?: string; description?: string; label?: string; placeholder?: string; defaultValue?: string; /** Keyboard shown for the input. Same values as `TextInput`. */ keyboardType?: TextInputProps['keyboardType']; /** Hide the typed text (passwords, PINs). */ secureTextEntry?: boolean; autoCapitalize?: TextInputProps['autoCapitalize']; maxLength?: number; /** * Any other `TextInput` prop. `value`, `onChangeText`, `placeholder` * and the props above are managed by the prompt and take precedence. */ inputProps?: Omit< TextInputProps, 'value' | 'onChangeText' | 'placeholder' | 'defaultValue' >; }; export interface AlertData extends PromptData { buttons?: Button[]; icon?: IconProp; iconColor?: string; showCancelButton?: boolean; } type Alpha = 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0; export type PersonalTheme = { backgroundColor?: `rgba(${number},${number},${number},${Alpha})`; backgroundInputColor?: string; cardBackgroundColor?: string; descriptionColor?: string; inputBorderColor?: string; inputColor?: string; lineColor?: string; placeholderColor?: string; textButtonColor?: string; titleColor?: string; }; export type ValidPlatforms = 'ios' | 'android'; export type Appearances = 'light' | 'dark';