This repository was archived by the owner on Oct 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ describe('OverflowMenu', () => {
110110
111111 it ( 'should render a ul with the appropriate class' , ( ) => {
112112 const rootWrapper = mount (
113- < OverflowMenu >
113+ < OverflowMenu menuOptionsClass = "extra-menu-class" >
114114 < div className = "test-child" />
115115 < div className = "test-child" />
116116 </ OverflowMenu >
@@ -124,6 +124,7 @@ describe('OverflowMenu', () => {
124124 const list = rootWrapper . find ( 'ul' ) ;
125125 expect ( list . length ) . toEqual ( 1 ) ;
126126 expect ( list . hasClass ( 'bx--overflow-menu-options' ) ) . toEqual ( true ) ;
127+ expect ( list . hasClass ( 'extra-menu-class' ) ) . toEqual ( true ) ;
127128 } ) ;
128129
129130 it ( 'should render children as expected' , ( ) => {
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ class OverflowMenu extends Component {
296296 */
297297 onClose : PropTypes . func ,
298298
299+ /**
300+ * The class to apply to the menu options
301+ */
302+ menuOptionsClass : PropTypes . string ,
303+
299304 /**
300305 * Function called when menu is closed
301306 */
@@ -577,6 +582,7 @@ class OverflowMenu extends Component {
577582 onOpen, // eslint-disable-line
578583 renderIcon : IconElement ,
579584 innerRef : ref ,
585+ menuOptionsClass,
580586 ...other
581587 } = this . props ;
582588 const floatingMenu = ! ! breakingChangesX || origFloatingMenu ;
@@ -613,6 +619,7 @@ class OverflowMenu extends Component {
613619 ) ;
614620
615621 const overflowMenuOptionsClasses = classNames (
622+ menuOptionsClass ,
616623 `${ prefix } --overflow-menu-options` ,
617624 {
618625 [ `${ prefix } --overflow-menu--flip` ] : this . props . flipped ,
You can’t perform that action at this time.
0 commit comments