rmwc
Version:
A thin React wrapper for Material Design (Web) Components
81 lines (80 loc) • 2.66 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { SimpleTagPropsT, WithRipplePropsT } from '../Base';
import { RMWCProviderOptionsT } from '../Provider';
/**
* Private
*/
export declare type FabPropsT = {
/** Make the Fab smaller. */
mini?: boolean;
/** Animates the FAB out of view. When this class is removed, the FAB will return to view. */
exited?: boolean;
/** cssOnly Fab. */
cssOnly?: boolean;
} & SimpleTagPropsT & WithRipplePropsT;
export declare const FabRoot: {
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;
};
};
export declare const FabIcon: {
new <P>(props: any, context?: any): {
render(): React.ReactElement<any> | null;
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: {
tag: string | React.ComponentClass<any> | React.StatelessComponent<any>;
constructor: Function;
toString(): string;
toLocaleString(): string;
valueOf(): Object;
hasOwnProperty(v: string | number | symbol): boolean;
isPrototypeOf(v: Object): boolean;
propertyIsEnumerable(v: string | number | symbol): boolean;
};
isSimpleTag: boolean;
};
/**
* Public
*/
/** A floating action button component */
export declare class Fab extends React.Component<FabPropsT> {
static defaultProps: {
mini: undefined;
exited: undefined;
cssOnly: undefined;
};
componentWillMount(): void;
static contextTypes: {
RMWCOptions: PropTypes.Requireable<any>;
};
providerOptions: RMWCProviderOptionsT;
context: Object;
render(): JSX.Element;
}
export default Fab;