2.0.9 • Published 5 months ago

@types/react-native-safari-view v2.0.9

Weekly downloads
2,797
License
MIT
Repository
github
Last release
5 months ago

Installation

npm install --save @types/react-native-safari-view

Summary

This package contains type definitions for react-native-safari-view (https://github.com/naoufal/react-native-safari-view).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-safari-view.

index.d.ts

// Type definitions for react-native-safari-view 2.0
// Project: https://github.com/naoufal/react-native-safari-view
// Definitions by: Michael Randolph <https://github.com/mrand01>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import { EmitterSubscription } from 'react-native';

export interface SafariViewOptions {
    /**
     * A String containing the url you want to load in the Safari View
     *
     */
    url: string;

    /**
     * A Boolean indicating to use Safari's Reader Mode if available
     *
     */
    readerMode?: boolean | undefined;

    /**
     * A String containing a hex or rgba color to use for the browser controls
     *
     */
    tintColor?: string | undefined;

    /**
     * A String containing a hex or rgba color to use for the background of the browser controls (only available on iOS 10 and higher)
     *
     */
    barTintColor?: string | undefined;

    /**
     * A Boolean indicating to open the Safari View from the bottom
     *
     */
    fromBottom?: boolean | undefined;
}

declare namespace SafariView {
    /**
     * Displays a Safari View with the provided URL
     *
     */
    function show(options: SafariViewOptions): Promise<boolean>;

    /**
     * Dismisses the currently active Safari View
     */
    function dismiss(): void;

    /**
     * Checks if Safari View is available on the device
     */
    function isAvailable(): Promise<boolean>;

    function addEventListener(event: string, listener: () => void): EmitterSubscription;

    function removeEventListener(event: string, listener: () => void): void;
}
export default SafariView;

Additional Details

  • Last updated: Thu, 08 Jul 2021 22:41:16 GMT
  • Dependencies: @types/react-native
  • Global values: none

Credits

These definitions were written by Michael Randolph.

2.0.9

5 months ago

2.0.7

7 months ago

2.0.6

7 months ago

2.0.8

6 months ago

2.0.5

3 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago