Skip to content

Commit 5b0444e

Browse files
committed
Merge pull request #71 from rleibman/master
Added openDirection to MuiIconMenu
2 parents 298c9d9 + 68db976 commit 5b0444e

File tree

1 file changed

+42
-31
lines changed

1 file changed

+42
-31
lines changed

core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiIconMenu.scala

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,63 @@ import scala.scalajs.js.`|`
99
/**
1010
* This file is generated - submit issues instead of PR against it
1111
*/
12-
12+
1313
case class MuiIconMenu(
14-
key: js.UndefOr[String] = js.undefined,
15-
ref: js.UndefOr[String] = js.undefined,
16-
/* This is the point on the icon where the menu
14+
key: js.UndefOr[String] = js.undefined,
15+
ref: js.UndefOr[String] = js.undefined,
16+
/* This is the point on the icon where the menu
1717
targetOrigin will stick to.
1818
Options:
1919
vertical: [top, middle, bottom]
2020
horizontal: [left, center, right].*/
21-
anchorOrigin: js.UndefOr[Origin] = js.undefined,
22-
/* The css class name of the root element.*/
23-
className: js.UndefOr[String] = js.undefined,
24-
/* If true, menu will close after an item is touchTapped.*/
25-
closeOnItemTouchTap: js.UndefOr[Boolean] = js.undefined,
26-
/* This is the IconButton to render. This button will open the menu.*/
27-
iconButtonElement: ReactElement,
28-
/* The style object to use to override underlying icon style.*/
29-
iconStyle: js.UndefOr[CssProperties] = js.undefined,
30-
/* The style object to use to override underlying menu style.*/
31-
menuStyle: js.UndefOr[CssProperties] = js.undefined,
32-
/* Fired when a menu item is touchTapped.*/
21+
anchorOrigin: js.UndefOr[Origin] = js.undefined,
22+
/* The css class name of the root element.*/
23+
className: js.UndefOr[String] = js.undefined,
24+
/* If true, menu will close after an item is touchTapped.*/
25+
closeOnItemTouchTap: js.UndefOr[Boolean] = js.undefined,
26+
/* This is the IconButton to render. This button will open the menu.*/
27+
iconButtonElement: ReactElement,
28+
/* The style object to use to override underlying icon style.*/
29+
iconStyle: js.UndefOr[CssProperties] = js.undefined,
30+
/* The style object to use to override underlying menu style.*/
31+
menuStyle: js.UndefOr[CssProperties] = js.undefined,
32+
/*This is the placement of the menu relative to the IconButton.*/
33+
openDirection: js.UndefOr[OpenDirection] = js.undefined,
34+
/* Fired when a menu item is touchTapped.*/
3335
onItemTouchTap: js.UndefOr[(ReactTouchEventH, ReactElement) => Callback] = js.undefined,
34-
/* Fired when keyobard focuses on element.*/
36+
/* Fired when keyobard focuses on element.*/
3537
onKeyboardFocus: js.UndefOr[ReactKeyboardEventH => Callback] = js.undefined,
36-
/* Fired when mouse is pressed on element.*/
38+
/* Fired when mouse is pressed on element.*/
3739
onMouseDown: js.UndefOr[ReactMouseEventH => Callback] = js.undefined,
38-
/* Fired when mouse enters the element.*/
40+
/* Fired when mouse enters the element.*/
3941
onMouseEnter: js.UndefOr[ReactMouseEventH => Callback] = js.undefined,
40-
/* Fired when mouse leaves the element.*/
42+
/* Fired when mouse leaves the element.*/
4143
onMouseLeave: js.UndefOr[ReactMouseEventH => Callback] = js.undefined,
42-
/* Fired when mouse is lifted inside the element.*/
44+
/* Fired when mouse is lifted inside the element.*/
4345
onMouseUp: js.UndefOr[ReactMouseEventH => Callback] = js.undefined,
44-
/* Callback function that is fired when the open state
46+
/* Callback function that is fired when the open state
4547
of the menu is requested to be changed. The provided
4648
open argument determines whether the menu is requested
4749
to be opened or closed. Also, the reason argument states
4850
why the menu got closed or opened. It can be 'keyboard',
4951
'iconTap' for open action and 'enter', 'escape', 'itemTap',
5052
'clickAway' for close action.*/
5153
onRequestChange: js.UndefOr[(Boolean, String) => Callback] = js.undefined,
52-
/* Fired when element is touch tapped.*/
54+
/* Fired when element is touch tapped.*/
5355
onTouchTap: js.UndefOr[ReactTouchEventH => Callback] = js.undefined,
54-
/* Controls whether the IconMenu is opened or not.*/
55-
open: js.UndefOr[Boolean] = js.undefined,
56-
/* Override the inline-styles of the root element.*/
57-
style: js.UndefOr[CssProperties] = js.undefined,
58-
/* This is the point on the menu which will stick to the menu
56+
/* Controls whether the IconMenu is opened or not.*/
57+
open: js.UndefOr[Boolean] = js.undefined,
58+
/* Override the inline-styles of the root element.*/
59+
style: js.UndefOr[CssProperties] = js.undefined,
60+
/* This is the point on the menu which will stick to the menu
5961
origin.
6062
Options:
6163
vertical: [top, middle, bottom]
6264
horizontal: [left, center, right].*/
63-
targetOrigin: js.UndefOr[Origin] = js.undefined,
64-
/* Sets the delay in milliseconds before closing the
65+
targetOrigin: js.UndefOr[Origin] = js.undefined,
66+
/* Sets the delay in milliseconds before closing the
6567
menu when an item is clicked.*/
66-
touchTapCloseDelay: js.UndefOr[Int] = js.undefined){
68+
touchTapCloseDelay: js.UndefOr[Int] = js.undefined) {
6769
/**
6870
* @param children Should be used to pass `MenuItem` components.
6971
*/
@@ -78,3 +80,12 @@ menu when an item is clicked.*/
7880
f(props, children.toJsArray).asInstanceOf[ReactComponentU_]
7981
}
8082
}
83+
84+
case class OpenDirection private (val value: String) extends AnyVal
85+
86+
object OpenDirection {
87+
val bottom_left = OpenDirection("bottom-left")
88+
val bottom_right = OpenDirection("bottom-right")
89+
val top_left = OpenDirection("top-left")
90+
val top_right = OpenDirection("top-right")
91+
}

0 commit comments

Comments
 (0)