6.0.4 • Published 6 months ago

@types/react-swipe v6.0.4

Weekly downloads
6,103
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-swipe

Summary

This package contains type definitions for react-swipe (https://github.com/voronianski/react-swipe).

Details

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

index.d.ts

// Type definitions for react-swipe 6.0
// Project: https://github.com/voronianski/react-swipe
// Definitions by: Deividas Bakanas <https://github.com/DeividasBakanas>, Ammar Alakkad <https://github.com/AAlakkad>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

/// <reference types="swipe" />

import * as React from "react";

declare class ReactSwipe extends React.Component<ReactSwipe.Props> {
    prev(): void;
    next(): void;
    getPos(): number;
    getNumSlides(): number;
    slide(index: number, duration: number): void;
}

declare namespace ReactSwipe {
    interface Style {
        container: React.CSSProperties;
        wrapper: React.CSSProperties;
        child: React.CSSProperties;
    }

    interface Props {
        children?: React.ReactNode;
        id?: string | undefined;
        swipeOptions?: SwipeOptions | undefined;
        childCount?: number | undefined;
        style?: Style | undefined;
        className?: string | undefined;
    }
}

export = ReactSwipe;

Additional Details

Credits

These definitions were written by Deividas Bakanas, and Ammar Alakkad.