diff --git a/components/menu/Menu.js b/components/menu/Menu.js index b3cdc5ee..07a57dba 100644 --- a/components/menu/Menu.js +++ b/components/menu/Menu.js @@ -25,7 +25,7 @@ const factory = (MenuItem) => { onSelect: PropTypes.func, onShow: PropTypes.func, outline: PropTypes.bool, - position: PropTypes.string, + position: PropTypes.oneOf(Object.keys(POSITION).map(key => POSITION[key])), ripple: PropTypes.bool, selectable: PropTypes.bool, selected: PropTypes.any, diff --git a/components/menu/readme.md b/components/menu/readme.md index ea795d63..2a5876c2 100644 --- a/components/menu/readme.md +++ b/components/menu/readme.md @@ -7,7 +7,7 @@ A [Menu](https://www.google.com/design/spec/components/menus.html) is a temporar import {IconMenu, MenuItem, MenuDivider } from 'react-toolbox/lib/menu'; const MenuTest = () => ( - + @@ -33,7 +33,7 @@ This subcomponent is the default wrapper for a menu and is responsible for the o | `onSelect` | `Function` | | Callback that will be invoked when a menu item is selected. | | `onShow` | `Function` | | Callback that will be invoked when the menu is being shown. | | `outline` | `Boolean` | `true` | If true the menu wrapper will show an outline with a soft shadow. | -| `position` | `String` | `static` | Determine the position of the menu. With `static` value the menu will be always shown, `auto` means that the it will decide the opening direction based on the current position. To force a position use `top-left`, `top-right`, `bottom-left`, `bottom-right`. | +| `position` | `String` | `static` | Determine the position of the menu. With `static` value the menu will be always shown, `auto` means that the it will decide the opening direction based on the current position. To force a position use `topLeft`, `topRight`, `bottomLeft`, `bottomRight`. | | `ripple` | `Boolean` | `true` | If true, the menu items will show a ripple effect on click. | | `selectable` | `Boolean` | `false` | If true, the menu will keep a value to highlight the active child item. | | `selected` | `Any` | | Used for selectable menus. Indicates the current selected value so the child item with this value can be highlighted. | diff --git a/docs/app/components/layout/main/modules/examples/menu_example_1.txt b/docs/app/components/layout/main/modules/examples/menu_example_1.txt index 9b31278e..b665da59 100644 --- a/docs/app/components/layout/main/modules/examples/menu_example_1.txt +++ b/docs/app/components/layout/main/modules/examples/menu_example_1.txt @@ -1,5 +1,5 @@ const MenuTest = () => ( - +