Socket
Socket
Sign inDemoInstall

@types/brainhubeu__react-carousel

Package Overview
Dependencies
3
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/brainhubeu__react-carousel

TypeScript definitions for @brainhubeu/react-carousel


Version published
Maintainers
1
Install size
1.62 MB
Created

Readme

Source

Installation

npm install --save @types/brainhubeu__react-carousel

Summary

This package contains type definitions for @brainhubeu/react-carousel (https://github.com/brainhubeu/react-carousel).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/brainhubeu__react-carousel.

index.d.ts

import * as React from "react";
export type ImgProps = React.ReactComponentElement<"img">;

export interface DotsProps {
    number?: number | undefined;
    thumbnails?: ImgProps[] | undefined;
    value?: number | undefined;
    onChange?(value: number): void;
    rtl?: boolean | undefined;
    className?: string | undefined;
}

export class Dots extends React.Component<DotsProps> {}

export type PluginStrategy = (originalValue: number, previousValue: number) => number;

export type CarouselPluginFunc = ({
    options,
    carouselProps,
    refs,
}: {
    options?: any;
    carouselProps: CarouselProps;
    refs: Record<string, React.RefObject<HTMLElement>>;
}) => {
    plugin?: (() => void) | undefined;
    beforeCarouselItems?: (() => JSX.Element) | undefined;
    afterCarouselItems?: (() => JSX.Element) | undefined;
    carouselCustomProps?: (() => Record<string, () => any>) | undefined;
    trackCustomProps?: (() => Record<string, () => any>) | undefined;
    slideCustomProps?: (() => Record<string, () => any>) | undefined;
    strategies?: (() => Record<string, PluginStrategy>) | undefined;
    itemClassNames?: (() => string[]) | undefined;
    carouselClassNames?: (() => string[]) | undefined;
};

export interface CarouselPluginTypes {
    resolve: CarouselPluginFunc;
    options?: any;
}

export interface CarouselBreakpoints {
    [breakpointNumber: number]: Pick<CarouselProps, Exclude<keyof CarouselProps, "breakpoints">>;
}

export interface CarouselProps {
    children?: React.ReactNode;
    itemWidth?: number | undefined;
    value?: number | undefined;
    onChange?(value: number): void;
    slides?: JSX.Element[] | undefined;
    offset?: number | undefined;
    draggable?: boolean | undefined;
    animationSpeed?: number | undefined;
    className?: string | undefined;
    breakpoints?: CarouselBreakpoints | undefined;
    plugins?: Array<string | CarouselPluginTypes> | undefined;
}

export default class extends React.Component<CarouselProps> {}

export const slidesToShowPlugin: CarouselPluginFunc;
export const infinitePlugin: CarouselPluginFunc;
export const clickToChangePlugin: CarouselPluginFunc;
export const autoplayPlugin: CarouselPluginFunc;
export const rtlPlugin: CarouselPluginFunc;
export const centeredPlugin: CarouselPluginFunc;
export const slidesToScrollPlugin: CarouselPluginFunc;
export const arrowsPlugin: CarouselPluginFunc;
export const fastSwipePlugin: CarouselPluginFunc;

Additional Details

  • Last updated: Tue, 17 Oct 2023 22:10:13 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Jack Allen, Jeff Wen, and Robert Hebel.

FAQs

Last updated on 17 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc