Files
devhub/@types/react-native-safari-view/index.d.ts
2018-10-17 12:01:44 -03:00

22 lines
620 B
TypeScript

declare module 'react-native-safari-view' {
import { EmitterSubscription } from 'react-native'
export type Event = 'onShow' | 'onDismiss'
export interface SafaryOptions {
url: string
readerMode?: boolean
tintColor?: string
barTintColor?: string
fromBottom?: boolean
}
export function show(options: SafaryOptions): void
export function dismiss(): void
export function isAvailable(): Promise<boolean>
export function addEventListener(
event: Event,
listener: () => any,
): EmitterSubscription
export function removeEventListener(event: Event, listener: () => any): void
}