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/widget-area/widgets/text.jsx

    r4223 r5024  
    1 import React from 'react';
     1/**
     2 * External dependencies.
     3 */
     4import React, { PropTypes } from 'react';
    25
    3 export default React.createClass( {
    4     displayName: 'TextWidget',
     6export const TextWidget = ( { widget } ) => (
     7    <div className="widget widget_text">
     8        <h3 className="widget-title">{ widget.title }</h3>
     9        <div className="textwidget">{ widget.text }</div>
     10    </div>
     11);
    512
    6     render() {
    7         return (
    8             <div className="widget widget_text">
    9                 <h3 className="widget-title">{ this.props.widget.title }</h3>
    10                 <div className="textwidget">{ this.props.widget.text }</div>
    11             </div>
    12         )
    13     }
    14 } );
     13TextWidget.propTypes = {
     14    widget: PropTypes.object,
     15};
     16
     17TextWidget.defaultProps = {
     18    widget: {},
     19};
     20
     21export default TextWidget;
Note: See TracChangeset for help on using the changeset viewer.