mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
Merge pull request #18723 from dan-j/master
[material-ui] Added missing prop definitions for <DropDownMenu />
This commit is contained in:
Vendored
+4
@@ -1229,6 +1229,7 @@ declare namespace __MaterialUI {
|
||||
|
||||
interface DropDownMenuProps {
|
||||
// <div/> is the element that gets the 'other' properties
|
||||
anchorOrigin?: propTypes.origin;
|
||||
animated?: boolean;
|
||||
animation?: React.ComponentClass<Popover.PopoverAnimationProps>;
|
||||
autoWidth?: boolean;
|
||||
@@ -1239,13 +1240,16 @@ declare namespace __MaterialUI {
|
||||
labelStyle?: React.CSSProperties;
|
||||
listStyle?: React.CSSProperties;
|
||||
maxHeight?: number;
|
||||
menuItemStyle?: React.CSSProperties;
|
||||
menuStyle?: React.CSSProperties;
|
||||
multiple?: boolean;
|
||||
onChange?(e: TouchTapEvent, index: number, menuItemValue: any): void;
|
||||
onClose?(e: TouchTapEvent): void;
|
||||
openImmediately?: boolean;
|
||||
selectedMenuItemStyle?: React.CSSProperties;
|
||||
selectionRenderer?(value: any, menuItem: any): void;
|
||||
style?: React.CSSProperties;
|
||||
targetOrigin?: propTypes.origin;
|
||||
underlineStyle?: React.CSSProperties;
|
||||
value?: any;
|
||||
}
|
||||
|
||||
@@ -2764,6 +2764,17 @@ class DropDownMenuOpenImmediateExample extends React.Component<{}, {value?: numb
|
||||
}
|
||||
}
|
||||
|
||||
const DropDownMenuAnchorExample: React.SFC<{}> = () => (
|
||||
<DropDownMenu
|
||||
value={1}
|
||||
targetOrigin={{ horizontal: 'middle', vertical: 'top' }}
|
||||
anchorOrigin={{ horizontal: 'middle', vertical: 'top' }}
|
||||
>
|
||||
<MenuItem value={1} primaryText="First" />
|
||||
<MenuItem value={2} primaryText="Second" />
|
||||
</DropDownMenu>
|
||||
);
|
||||
|
||||
const items: Array<React.ReactElement<__MaterialUI.Menus.MenuItemProps>> = [];
|
||||
for (let i = 0; i < 100; i++) {
|
||||
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`}/>);
|
||||
|
||||
Reference in New Issue
Block a user