preact-material-components
Version:
preact wrapper for "Material Components for the web"
42 lines (41 loc) • 1.41 kB
TypeScript
import { MDCMenu } from '@material/menu';
import MaterialComponent from '../Base/MaterialComponent';
import { ListItem } from '../List';
export interface IMenuAnchorProps {
}
export interface IMenuAnchorState {
}
export declare class MenuAnchor extends MaterialComponent<IMenuAnchorProps, IMenuAnchorState> {
protected componentName: string;
protected mdcProps: never[];
protected materialDom(props: any): JSX.Element;
}
export { ListItem as MenuItem } from '../List';
export interface IMenuProps {
open?: boolean;
'open-from-top-left'?: boolean;
'open-from-top-right'?: boolean;
'open-from-bottom-left'?: boolean;
'open-from-bottom-right'?: boolean;
onSelect?: (e: Event) => void;
onCancel?: (e: Event) => void;
onMenuClosed?: (e: Event) => void;
}
export interface IMenuState {
}
export declare class Menu extends MaterialComponent<IMenuProps, IMenuState> {
MDComponent?: MDCMenu;
protected componentName: string;
protected mdcProps: string[];
protected mdcNotifyProps: string[];
componentDidMount(): void;
componentWillUnmount(): void;
protected onSelect(e: any): void;
protected onCancel(e: any): void;
protected onMenuClosed(e: any): void;
protected materialDom(props: any): JSX.Element;
}
export default class extends Menu {
static readonly Anchor: typeof MenuAnchor;
static readonly Item: typeof ListItem;
}