Skip to content

Commit

Permalink
Merge pull request #1318 from unageanu/add-menu-item-class-name-to-le…
Browse files Browse the repository at this point in the history
…ft-navi

[LeftNav] add menuItemClassName props to LeftNavi.
  • Loading branch information
Hai Nguyen committed Aug 4, 2015
2 parents 7f04158 + 187203f commit c7f8d1c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/src/app/components/pages/components/left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ class LeftNavPage extends React.Component {
type: 'object',
header: 'optional',
desc: 'Override the inline-styles of LeftNav\'s root element.'
},
{
name: 'menuItemClassName',
type: 'string',
header: 'optional',
desc: 'Class name for the menuItem.'
},
{
name: 'menuItemClassNameSubheader',
type: 'string',
header: 'optional',
desc: 'Class name for the subheader menuItem.'
},
{
name: 'menuItemClassNameLink',
type: 'string',
header: 'optional',
desc: 'Class name for the link menuItem.'
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions src/left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ let LeftNav = React.createClass({
onNavClose: React.PropTypes.func,
openRight: React.PropTypes.bool,
selectedIndex: React.PropTypes.number,
menuItemClassName: React.PropTypes.string,
menuItemClassNameSubheader: React.PropTypes.string,
menuItemClassNameLink: React.PropTypes.string,
},

windowListeners: {
Expand Down Expand Up @@ -174,6 +177,9 @@ let LeftNav = React.createClass({
menuItemStyle={this.mergeAndPrefix(styles.menuItem)}
menuItemStyleLink={this.mergeAndPrefix(styles.menuItemLink)}
menuItemStyleSubheader={this.mergeAndPrefix(styles.menuItemSubheader)}
menuItemClassName={this.props.menuItemClassName}
menuItemClassNameSubheader={this.props.menuItemClassNameSubheader}
menuItemClassNameLink={this.props.menuItemClassNameLink}
selectedIndex={selectedIndex}
onItemTap={this._onMenuItemClick} />
</Paper>
Expand Down

0 comments on commit c7f8d1c

Please sign in to comment.