DefinitelyTyped/types/materialize-css/parallax.d.ts
Max a355d32369 materialize-css: Add missing declarations and tests (#25492)
* Restructure files and add missing declarations

* Add JQuery declarations

* Restructure tests

* Add carousel tests

* Add more tests and missing JQuery declarations

* Add waves declaration and a test

* Add static init methods and tests

* allow jquery and cash object to be passed to init

* Remove redundant reference

* Clean up

* Clean up

* Clean up and add tests

* Clean up and add tests
2018-05-07 11:00:18 -07:00

34 lines
866 B
TypeScript

/// <reference path="./common.d.ts" />
declare namespace M {
class Parallax extends Component<ParallaxOptions> {
/**
* Get Instance
*/
static getInstance(elem: Element): Parallax;
/**
* Init Parallax
*/
static init(els: Element, options?: Partial<ParallaxOptions>): Parallax;
/**
* Init Parallaxs
*/
static init(els: MElements, options?: Partial<ParallaxOptions>): Parallax[];
}
interface ParallaxOptions {
/**
* The minimum width of the screen, in pixels, where the parallax functionality starts working
* @default 0
*/
responsiveThreshold: number;
}
}
interface JQuery {
parallax(options?: Partial<M.ParallaxOptions>): JQuery;
parallax(method: keyof Pick<M.Parallax, "destroy">): JQuery;
}