Changeset 5024 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/widget-area/widgets/text.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/widget-area/widgets/text.jsx
r4223 r5024 1 import React from 'react'; 1 /** 2 * External dependencies. 3 */ 4 import React, { PropTypes } from 'react'; 2 5 3 export default React.createClass( { 4 displayName: 'TextWidget', 6 export 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 ); 5 12 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 } );13 TextWidget.propTypes = { 14 widget: PropTypes.object, 15 }; 16 17 TextWidget.defaultProps = { 18 widget: {}, 19 }; 20 21 export default TextWidget;
Note: See TracChangeset
for help on using the changeset viewer.