Making WordPress.org


Ignore:
Timestamp:
12/04/2016 05:14:43 PM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Provide focus styles and context for favorite button.

Fixes #2294.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/favorite-button/index.jsx

    r4223 r4467  
    11import React from 'react';
    2 import { connect } from 'react-redux';
    3 import includes from 'lodash/includes';
    42
    53import FavoriteButton from './button';
     
    108} from 'actions/index';
    119
    12 const FavoriteButtonContainer = React.createClass( {
     10export default React.createClass( {
    1311    componentDidMount() {
    1412        this.getFavorites();
     
    3432
    3533    render() {
    36         return <FavoriteButton { ...this.props } toggleFavorite={ this.toggleFavorite } />;
     34        return <FavoriteButton toggleFavorite={ this.toggleFavorite } />;
    3735    }
    3836} );
    39 
    40 const mapStateToProps = ( state, ownProps ) => ( {
    41     initialFavorite: includes( state.favorites, ownProps.plugin.slug )
    42 } );
    43 
    44 export default connect( mapStateToProps )( FavoriteButtonContainer );
Note: See TracChangeset for help on using the changeset viewer.