Skip to content

Commit

Permalink
feat(Menu): add left value to the position prop (#1852)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored and levithomason committed Jul 16, 2017
1 parent 5a48d58 commit 929305e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/collections/Menu/MenuItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export interface MenuItemProps {
*/
onClick?: (event: React.MouseEvent<HTMLAnchorElement>, data: MenuItemProps) => void;

/** A menu item can take right position. */
position?: 'right';
/** A menu item can take left or right position. */
position?: 'left' | 'right';
}

declare const MenuItem: React.ComponentClass<MenuItemProps>;
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Menu/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export default class MenuItem extends Component {
*/
onClick: PropTypes.func,

/** A menu item can take right position. */
position: PropTypes.oneOf(['right']),
/** A menu item can take left or right position. */
position: PropTypes.oneOf(['left', 'right']),
}

static _meta = {
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Menu/MenuMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export interface MenuMenuProps {
/** Additional classes. */
className?: string;

/** A sub menu can take right position. */
position?: 'right';
/** A sub menu can take left or right position. */
position?: 'left' | 'right';
}

declare const MenuMenu: React.StatelessComponent<MenuMenuProps>;
Expand Down
4 changes: 2 additions & 2 deletions src/collections/Menu/MenuMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ MenuMenu.propTypes = {
/** Additional classes. */
className: PropTypes.string,

/** A sub menu can take right position. */
position: PropTypes.oneOf(['right']),
/** A sub menu can take left or right position. */
position: PropTypes.oneOf(['left', 'right']),
}

export default MenuMenu
2 changes: 1 addition & 1 deletion test/specs/collections/Menu/MenuItem-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('MenuItem', () => {
common.propKeyOrValueAndKeyToClassName(MenuItem, 'fitted', ['horizontally', 'vertically'])

common.propValueOnlyToClassName(MenuItem, 'color', SUI.COLORS)
common.propValueOnlyToClassName(MenuItem, 'position', ['right'])
common.propValueOnlyToClassName(MenuItem, 'position', ['left', 'right'])

it('renders a `div` by default', () => {
shallow(<MenuItem />)
Expand Down
2 changes: 1 addition & 1 deletion test/specs/collections/Menu/MenuMenu-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ describe('MenuMenu', () => {
common.isConformant(MenuMenu)
common.rendersChildren(MenuMenu)

common.propValueOnlyToClassName(MenuMenu, 'position', ['right'])
common.propValueOnlyToClassName(MenuMenu, 'position', ['left', 'right'])
})

0 comments on commit 929305e

Please sign in to comment.