rmwc
Version:
A thin React wrapper for Material Design (Web) Components
96 lines (95 loc) • 3.67 kB
TypeScript
import * as React from 'react';
export declare type RipplePropsT = {
/** Makes the ripple unbounded */
unbounded?: boolean;
/** Makes the ripple primary */
primary?: boolean;
/** Makes the ripple an accent color*/
accent?: boolean;
/** makes the ripple disabled */
disabled?: boolean;
};
declare const Ripple_base: {
new <P>(props: P & {
tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined;
className?: string | undefined;
wrap?: boolean | undefined;
elementRef?: any;
theme?: string | string[] | undefined;
children?: React.ReactNode;
apiRef?: (<S>(api: S) => S) | undefined;
} & React.HTMLProps<any>): {
foundation_: {
[key: string]: any;
adapter_: any;
init: Function;
destroy: Function;
} | null;
foundationRefs: {
[name: string]: (ref: HTMLElement) => any;
};
root_: Element | Text | null;
props: P & {
tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined;
className?: string | undefined;
wrap?: boolean | undefined;
elementRef?: any;
theme?: string | string[] | undefined;
children?: React.ReactNode;
apiRef?: (<S>(api: S) => S) | undefined;
} & React.HTMLProps<any>;
componentDidMount(): void;
componentWillReceiveProps(nextProps: P & {
tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined;
className?: string | undefined;
wrap?: boolean | undefined;
elementRef?: any;
theme?: string | string[] | undefined;
children?: React.ReactNode;
apiRef?: (<S>(api: S) => S) | undefined;
} & React.HTMLProps<any>): void;
componentWillUnmount(): void;
_safeSyncWithProps(props: Object): void;
initFoundation(): void;
destroyComponent(): void;
syncWithProps(nextProps: Object): void;
initialize(...args: any[]): void;
initialSyncWithDOM(): void;
destroy(): void;
getDefaultFoundation(): {
adapter_: {};
init: () => void;
destroy: () => void;
};
emit(evtType: string, evtData: Object, shouldBubble?: boolean): any;
listen(evtType: string, handler: Function): void;
unlisten(evtType: string, handler: Function): void;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: P & {
tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined;
className?: string | undefined;
wrap?: boolean | undefined;
elementRef?: any;
theme?: string | string[] | undefined;
children?: React.ReactNode;
apiRef?: (<S>(api: S) => S) | undefined;
} & React.HTMLProps<any>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callBack?: (() => void) | undefined): void;
render(): React.ReactNode;
state: Readonly<{}>;
context: any;
refs: {
[key: string]: React.ReactInstance;
};
};
};
export declare class Ripple extends Ripple_base<RipplePropsT & {
surface?: boolean;
}> {
static displayName: string;
unbounded: boolean;
disabled: boolean;
componentDidMount(): void;
syncWithProps(nextProps: RipplePropsT): void;
render(): React.ReactElement<any>;
}
export default Ripple;