Changeset 5024 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/site-header/main-navigation/menu-item/index.jsx
- Timestamp:
- 03/01/2017 06:08:54 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/site-header/main-navigation/menu-item/index.jsx
r4223 r5024 1 import React from 'react'; 1 /** 2 * External dependencies. 3 */ 4 import React, { PropTypes } from 'react'; 2 5 import { Link } from 'react-router'; 3 6 4 export default React.createClass( { 5 displayName: 'MenuItem', 7 export const MenuItem = ( { item } ) => ( 8 <li className="page_item"> 9 <Link to={ item.path } activeClassName="active">{ item.label }</Link> 10 </li> 11 ); 6 12 7 render(){8 return (9 <li className="page_item">10 <Link to={ this.props.item.path } activeClassName="active">{ this.props.item.label }</Link>11 </li>12 ) 13 } 14 } );13 MenuItem.propTypes = { 14 params: PropTypes.shape( { 15 label: PropTypes.string, 16 path: PropTypes.string, 17 } ), 18 }; 19 20 export default MenuItem;
Note: See TracChangeset
for help on using the changeset viewer.