-
Notifications
You must be signed in to change notification settings - Fork 8
/
Menu.d.ts
36 lines (28 loc) · 1.02 KB
/
Menu.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {
Component,
ReactNode
} from 'react'
import {
SimpleBaseProps
} from './Base'
export type AnchorCorner = "bottomEnd" | "bottomLeft" | "bottomRight" | "bottomStart"
| "topEnd" | "topLeft" | "topRight" | "topStart";
interface CommonMenuProps {
/** Whether or not the Menu is open. */
open?: boolean;
/** Callback that fires when the Menu closes. */
onClose?: (evt: Event) => any;
/** Callback that fires when a Menu item is selected. */
onSelected?: (evt: Event) => any;
anchorCorner?: AnchorCorner;
}
export interface MenuProps extends CommonMenuProps, SimpleBaseProps<Menu> {
}
export interface SimpleMenuProps extends CommonMenuProps, SimpleBaseProps<SimpleMenu> {
handle: ReactNode;
rootProps?: object;
}
export class MenuItem extends Component<SimpleBaseProps<MenuItem>> { }
export class Menu extends Component<MenuProps> { }
export class MenuAnchor extends Component<{}> { }
export class SimpleMenu extends Component<SimpleMenuProps> { }