@types/react-swipeable-views
TypeScript icon, indicating that this package has built-in type declarations

0.13.6 • Public • Published

Installation

npm install --save @types/react-swipeable-views

Summary

This package contains type definitions for react-swipeable-views (https://github.com/oliviertassinari/react-swipeable-views).

Details

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

import * as React from "react";

export type OnChangeIndexCallback = (index: number, indexLatest: number) => void;

export type OnTransitionEndCallback = () => void;

export type OnSwitchingCallback = (index: number, type: OnSwitchingCallbackTypeDescriptor) => void;

export type OnSwitchingCallbackTypeDescriptor = "move" | "end";

export type AxisType = "x" | "x-reverse" | "y" | "y-reverse";

export interface Actions {
    updateHeight: UpdateHeightAction;
}

export type ActionCallback = (actions: Actions) => void;

export type UpdateHeightAction = () => void;

export interface SpringConfig {
    duration: string;
    easeFunction: string;
    delay: string;
}

export interface SwipeableViewsProps extends Omit<React.HTMLProps<HTMLDivElement>, "action" | "ref"> {
    animateHeight?: boolean | undefined;
    animateTransitions?: boolean | undefined;
    axis?: AxisType | undefined;
    containerStyle?: React.CSSProperties | undefined;
    disabled?: boolean | undefined;
    /*
     * This is the config used to disable lazy loading, if true it will render all the views in first rendering.
     */
    disableLazyLoading?: boolean | undefined;
    enableMouseEvents?: boolean | undefined;
    hysteresis?: number | undefined;
    ignoreNativeScroll?: boolean | undefined;
    index?: number | undefined;
    onChangeIndex?: OnChangeIndexCallback | undefined;
    onSwitching?: OnSwitchingCallback | undefined;
    onTransitionEnd?: OnTransitionEndCallback | undefined;
    resistance?: boolean | undefined;
    style?: React.CSSProperties | undefined;
    slideStyle?: React.CSSProperties | undefined;
    springConfig?: SpringConfig | undefined;
    slideClassName?: string | undefined;
    threshold?: number | undefined;
    action?: ActionCallback;
}

export interface SwipeableViewsState {
    indexCurrent?: number | undefined;
    indexLatest?: number | undefined;
    isDragging?: boolean | undefined;
    isFirstRender?: boolean | undefined;
    heightLatest?: number | undefined;
    displaySameSlide?: boolean | undefined;
}

export default class SwipeableViews extends React.Component<SwipeableViewsProps, SwipeableViewsState> {}

Additional Details

  • Last updated: Thu, 05 Dec 2024 19:32:25 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Michael Ledin, and Deividas Bakanas.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.262ts2.0
0.0.270ts2.1
0.0.270ts2.2
0.13.638,173ts5.1
0.13.638,173ts5.3
0.13.638,173latest
0.13.638,173ts5.0
0.13.638,173ts5.2
0.13.638,173ts5.4
0.13.638,173ts5.5
0.13.638,173ts5.8
0.13.638,173ts5.7
0.13.638,173ts5.6
0.13.638,173ts5.9
0.13.532,901ts4.5
0.13.532,901ts4.6
0.13.532,901ts4.7
0.13.532,901ts4.8
0.13.532,901ts4.9
0.13.122,114ts3.6
0.13.122,114ts3.7
0.13.122,114ts3.8
0.13.122,114ts3.9
0.13.122,114ts4.0
0.13.122,114ts4.1
0.13.122,114ts4.2
0.13.23,974ts4.3
0.13.23,974ts4.4
0.13.02,838ts2.8
0.13.02,838ts2.9
0.13.02,838ts3.0
0.13.02,838ts3.1
0.13.02,838ts3.2
0.13.02,838ts3.3
0.13.02,838ts3.4
0.13.02,838ts3.5
0.12.17ts2.6
0.12.17ts2.7
0.12.05ts2.3
0.12.05ts2.4
0.12.05ts2.5

Version History

VersionDownloads (Last 7 Days)Published
0.13.638,173
0.13.532,901
0.13.41,478
0.13.3987
0.13.23,974
0.13.122,114
0.13.02,838
0.12.2459
0.12.17
0.12.05
0.0.280
0.0.270
0.0.262
0.0.252
0.0.24-alpha1
0.0.23-alpha0
0.0.22-alpha0
0.0.21-alpha0
0.0.20-alpha1
0.0.19-alpha0
0.0.18-alpha0
0.0.13-alpha0
0.0.12-alpha0

Package Sidebar

Install

npm i @types/react-swipeable-views

Weekly Downloads

102,942

Version

0.13.6

License

MIT

Unpacked Size

7.28 kB

Total Files

5

Last publish

Collaborators

  • types