UNPKG

rmwc

Version:

A thin React wrapper for Material Design (Web) Components

112 lines (111 loc) 3.86 kB
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; /** The icon to use for the fab. */ icon?: boolean; /** Make the Fab extended with a label. */ label?: React.ReactNode; /** Animates the FAB out of view. When this class is removed, the FAB will return to view. */ exited?: boolean; /** cssOnly Fab. */ cssOnly?: boolean; /** Enable / disable the ripple. */ ripple?: 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; }; export declare const FabLabel: { 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 contextTypes: { RMWCOptions: PropTypes.Requireable<any>; }; static defaultProps: { ripple: boolean; }; componentWillMount(): void; providerOptions: RMWCProviderOptionsT; context: Object; render(): JSX.Element; } export default Fab;