@types/brainhubeu__react-carousel
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -1,9 +0,1 @@ | ||
// Type definitions for @brainhubeu/react-carousel 2.0 | ||
// Project: https://github.com/brainhubeu/react-carousel | ||
// Definitions by: Jack Allen <https://github.com/jackall3n> | ||
// Jeff Wen <https://github.com/sinchang> | ||
// Robert Hebel <https://github.com/roberthebel> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.8 | ||
import * as React from "react"; | ||
@@ -10,0 +2,0 @@ export type ImgProps = React.ReactComponentElement<"img">; |
{ | ||
"name": "@types/brainhubeu__react-carousel", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "TypeScript definitions for @brainhubeu/react-carousel", | ||
@@ -10,14 +10,14 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/brainhubeu__react-carousel", | ||
"name": "Jack Allen", | ||
"url": "https://github.com/jackall3n", | ||
"githubUsername": "jackall3n" | ||
"githubUsername": "jackall3n", | ||
"url": "https://github.com/jackall3n" | ||
}, | ||
{ | ||
"name": "Jeff Wen", | ||
"url": "https://github.com/sinchang", | ||
"githubUsername": "sinchang" | ||
"githubUsername": "sinchang", | ||
"url": "https://github.com/sinchang" | ||
}, | ||
{ | ||
"name": "Robert Hebel", | ||
"url": "https://github.com/roberthebel", | ||
"githubUsername": "roberthebel" | ||
"githubUsername": "roberthebel", | ||
"url": "https://github.com/roberthebel" | ||
} | ||
@@ -36,4 +36,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "01c75f82d1f571b43e86ba42bee9ac36d47ce3c1a84d70c9db6ce05245120dce", | ||
"typesPublisherContentHash": "749c0d176b63d79234a3cc22ae410025d4ae27639f186ede5031ae70c2391014", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -9,9 +9,82 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/brainhubeu__react-carousel. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/brainhubeu__react-carousel/index.d.ts) | ||
````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: Fri, 15 Sep 2023 19:06:48 GMT | ||
* Last updated: Tue, 17 Oct 2023 22:10:13 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [Jack Allen](https://github.com/jackall3n), [Jeff Wen](https://github.com/sinchang), and [Robert Hebel](https://github.com/roberthebel). |
8043
90
61