preact-material-components
Version:
preact wrapper for "Material Components for the web"
60 lines (59 loc) • 2.13 kB
TypeScript
import { MDCDrawer } from '@material/drawer';
import MaterialComponent from '../Base/MaterialComponent';
import { ListLinkItem } from '../List';
export interface IDrawerProps {
onOpen?: (e: Event) => void;
onClose?: (e: Event) => void;
}
export interface IDrawerHeaderProps {
}
export interface IDrawerHeaderState {
}
export declare class DrawerHeader extends MaterialComponent<IDrawerHeaderProps, IDrawerHeaderState> {
protected componentName: string;
protected mdcProps: never[];
protected materialDom(props: any): JSX.Element;
}
export interface IDrawerContentProps {
}
export interface IDrawerContentState {
}
export declare class DrawerContent<PropsType = {}, StateType = {}> extends MaterialComponent<PropsType & IDrawerContentProps, StateType & IDrawerContentState> {
protected componentName: string;
protected mdcProps: never[];
protected materialDom(props: any): JSX.Element;
}
export interface IDrawerItemProps {
selected?: boolean;
}
export interface IDrawerItemState {
}
export declare class DrawerItem extends ListLinkItem<IDrawerItemProps, IDrawerItemState> {
protected materialDom(props: any): JSX.Element;
}
export interface IDrawerProps extends JSX.HTMLAttributes {
onAccept?: JSX.GenericEventHandler;
onCancel?: JSX.GenericEventHandler;
dismissible?: boolean;
modal?: boolean;
}
export interface IDrawerState {
}
export declare class Drawer extends MaterialComponent<IDrawerProps, IDrawerState> {
static readonly DrawerContent: typeof DrawerContent;
static readonly DrawerHeader: typeof DrawerHeader;
static readonly DrawerItem: typeof DrawerItem;
MDComponent?: MDCDrawer;
protected componentName: string;
protected mdcProps: never[];
protected mdcNotifyProps: string[];
componentDidMount(): void;
protected onOpen(e: any): void;
protected onClose(e: any): void;
protected materialDom(props: any): JSX.Element;
}
export default class extends Drawer {
static readonly DrawerContent: typeof DrawerContent;
static readonly DrawerHeader: typeof DrawerHeader;
static readonly DrawerItem: typeof DrawerItem;
}