rmwc
Version:
A thin React wrapper for Material Design (Web) Components
87 lines (86 loc) • 3.05 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { SimpleTagPropsT, WithRipplePropsT } from '../Base';
import { RMWCProviderOptionsT } from '../Provider';
export declare type ButtonPropsT = {
/** Make the Button dense. */
dense?: boolean;
/** Make the Button raised. */
raised?: boolean;
/** Make the button unelevated. */
unelevated?: boolean;
/** Make the button outlined. */
outlined?: boolean;
} & SimpleTagPropsT & WithRipplePropsT;
/****************************************************************
* Private
****************************************************************/
export declare const ButtonRoot: {
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;
};
};
/****************************************************************
* Public
****************************************************************/
/** An icon that goes inside of buttons. This is an instance of the Icon component. */
export declare const ButtonIcon: {
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;
};
/**
* The Button component.
*/
export declare class Button extends React.Component<ButtonPropsT> {
static defaultProps: {
dense: boolean;
raised: boolean;
unelevated: boolean;
outlined: boolean;
};
componentWillMount(): void;
static contextTypes: {
RMWCOptions: PropTypes.Requireable<any>;
};
providerOptions: RMWCProviderOptionsT;
context: Object;
render(): JSX.Element;
}
export default Button;