rmwc
Version:
A thin React wrapper for Material Design (Web) Components
308 lines (307 loc) • 12 kB
TypeScript
import { SimpleTagPropsT } from '../Base';
import * as React from 'react';
export declare type ToolbarPropsT = {
/** Makes the toolbar fixed */
fixed?: boolean;
/** Adds a waterfall effect on scroll */
waterfall?: boolean;
/** Fixes the last row of a multi-row toolbar */
fixedLastrowOnly?: boolean;
/** makes the toolbar flexible */
flexible?: boolean;
/** further defines the background and title movement behavior, use in conjunction with flexible. */
flexibleDefaultBehavior?: boolean;
} & SimpleTagPropsT;
export declare const ToolbarRoot: {
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;
};
/** A Toolbar title */
export declare const ToolbarTitle: {
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;
};
declare type ToolbarSectionPropsT = {
/** Aligns the ToolbarSection at the start. */
alignStart?: boolean;
/** Aligns the ToolbarSection at the end. */
alignEnd?: boolean;
/** Makes the ToolbarSection shrink to fit. */
shrinkToFit?: boolean;
} & SimpleTagPropsT;
declare const ToolbarSection_base: {
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 class ToolbarSection extends ToolbarSection_base<ToolbarSectionPropsT> {
static displayName: string;
render(): React.ReactElement<any> | null;
}
/** A Toolbar row */
export declare const ToolbarRow: {
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;
};
/**
* This component can be placed after a fixed Toolbar component to fill in the space.
*/
export declare const ToolbarFixedAdjust: {
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;
};
/**
* A Menu Icon For the Toolbar. This is an instance of the Icon component.
*/
export declare const ToolbarMenuIcon: {
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;
};
/**
* A standard Icon for toolbar actions. This is an instance of the Icon component.
*/
export declare const ToolbarIcon: {
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;
};
declare const Toolbar_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 Toolbar extends Toolbar_base<ToolbarPropsT> {
static displayName: string;
fixedAdjustElement: any;
root_: any;
componentDidMount(): void;
render(): JSX.Element;
}
export {};