diff --git a/native/flow-typed/npm/@expo/react-native-action-sheet_vx.x.x.js b/native/flow-typed/npm/@expo/react-native-action-sheet_vx.x.x.js new file mode 100644 --- /dev/null +++ b/native/flow-typed/npm/@expo/react-native-action-sheet_vx.x.x.js @@ -0,0 +1,78 @@ +// flow-typed signature: d46be163849e39e248d58b8d54ae8f16 +// flow-typed version: <>/@expo/react-native-action-sheet_v3.14.0/flow_v0.158.0 + +/** + * This is an autogenerated libdef stub for: + * + * '@expo/react-native-action-sheet' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module '@expo/react-native-action-sheet' { + // This is a bastardization of the true StyleObj type located in + // react-native/Libraries/StyleSheet/StyleSheetTypes. We unfortunately can't + // import that here, and it's too lengthy (and consequently too brittle) to + // copy-paste here either. + declare type StyleObj = + | null + | void + | number + | false + | '' + | $ReadOnlyArray + | { [name: string]: any, ... }; + + declare type ViewStyleProp = StyleObj; + declare type TextStyleProp = StyleObj; + + declare export type ActionSheetIOSOptions = {| + options: Array, + title?: string, + message?: string, + tintColor?: string, + cancelButtonIndex?: number, + destructiveButtonIndex?: number | Array, + anchor?: number, + userInterfaceStyle?: 'light' | 'dark', + disabledButtonIndices?: Array, + |}; + + declare export type ActionSheetOptions = {| + ...ActionSheetIOSOptions, + icons?: Array, + tintIcons?: boolean, + textStyle?: TextStyleProp, + messageTextStyle?: TextStyleProp, + autoFocus?: boolean, + showSeparators?: boolean, + containerStyle?: ViewStyleProp, + separatorStyle?: ViewStyleProp, + useModal?: boolean, + destructiveColor?: string, + |}; + + declare export type ShowActionSheetWithOptions = ( + options: ActionSheetOptions, + callback: (i?: number) => void | Promise, + ) => void; + + declare export type ActionSheetProps = { + showActionSheetWithOptions: ShowActionSheetWithOptions, + }; + + declare export function useActionSheet(): ActionSheetProps; + + declare export type ActionSheetProviderProps = {| + +children: React$Node, + +useNativeDriver?: boolean, + +useCustomActionSheet?: boolean, + |}; + + declare export class ActionSheetProvider + extends React$Component {} +}