rmwc
Version:
A thin React wrapper for Material Design (Web) Components
33 lines (32 loc) • 1.05 kB
TypeScript
import * as React from 'react';
export declare type WithRipplePropsT = {
ripple?: boolean;
surface?: boolean;
cssOnly?: boolean;
unbounded?: boolean;
};
/**
* HOC that adds ripples to any component
*/
export declare const withRipple: ({ unbounded: defaultUnbounded, surface: defaultSurface }?: {
unbounded?: boolean | undefined;
surface?: boolean | undefined;
}) => (Component: React.ComponentType<any>) => {
new (props: any, context?: any): {
render(): JSX.Element;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callBack?: (() => void) | undefined): void;
props: Readonly<{
children?: React.ReactNode;
}> & Readonly<any>;
state: Readonly<{}>;
context: any;
refs: {
[key: string]: React.ReactInstance;
};
};
displayName: string;
defaultProps: {
ripple: boolean;
};
};