Making WordPress.org


Ignore:
Timestamp:
03/01/2017 06:08:54 PM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Update React client with latest changes.

This is largely a cleanup commit with some WIP around switching to node-wpapi.

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 */
     4import React, { PropTypes } from 'react';
    25import { Link } from 'react-router';
    36
    4 export default React.createClass( {
    5     displayName: 'MenuItem',
     7export const MenuItem = ( { item } ) => (
     8    <li className="page_item">
     9        <Link to={ item.path } activeClassName="active">{ item.label }</Link>
     10    </li>
     11);
    612
    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 } );
     13MenuItem.propTypes = {
     14    params: PropTypes.shape( {
     15        label: PropTypes.string,
     16        path: PropTypes.string,
     17    } ),
     18};
     19
     20export default MenuItem;
Note: See TracChangeset for help on using the changeset viewer.