1.7.7 • Published 6 months ago

@types/fslightbox-react v1.7.7

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

Installation

npm install --save @types/fslightbox-react

Summary

This package contains type definitions for fslightbox-react (https://fslightbox.com/).

Details

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

index.d.ts

// Type definitions for fslightbox-react 1.4
// Project: https://fslightbox.com/
// Definitions by: Kirill Nikitin <https://github.com/locke23rus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as React from 'react';

export type SourceType = 'image' | 'video' | 'youtube' | null;

export type VideoPoster = string | null;

export interface VideoDimensions {
    width: number;
    height: number;
}

export interface FsLightboxProps {
    toggler: boolean;
    sources?: string[] | undefined;

    // custom sources
    customSources?: JSX.Element[] | undefined;

    // slide number controlling
    slide?: number | undefined;
    source?: string | undefined;
    sourceIndex?: number | undefined;

    // events
    onOpen?: (() => void) | undefined;
    onClose?: (() => void) | undefined;
    onInit?: (() => void) | undefined;
    onShow?: (() => void) | undefined;

    // types
    disableLocalStorage?: boolean | undefined;
    types?: SourceType[] | undefined;
    type?: SourceType | undefined;

    // sources
    videosPosters?: VideoPoster[] | undefined;
    maxYoutubeVideoDimensions?: VideoDimensions | undefined;

    // preferences
    loadOnlyCurrentSource?: boolean | undefined;
    showThumbsOnMount?: boolean | undefined;
    slideDistance?: number | undefined;
    openOnMount?: boolean | undefined;
}

declare class FsLightbox extends React.Component<FsLightboxProps> {}

export default FsLightbox;

Additional Details

  • Last updated: Fri, 17 Sep 2021 16:31:22 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Kirill Nikitin.

1.7.7

6 months ago

1.7.6

7 months ago

1.7.5

7 months ago

1.7.4

8 months ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

4 years ago