Pass SimpleRoomHeader title in as a named property
... rather than a child
This commit is contained in:
parent
0d261c37c2
commit
1f2ba87ff5
3 changed files with 11 additions and 16 deletions
|
@ -25,19 +25,18 @@ var React = require('react');
|
|||
module.exports = React.createClass({
|
||||
displayName: 'SimpleRoomHeader',
|
||||
|
||||
render: function() {
|
||||
var cancel;
|
||||
var header = (
|
||||
<div className="mx_RoomHeader_wrapper">
|
||||
<div className="mx_RoomHeader_simpleHeader">
|
||||
{ this.props.children }
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
propTypes: {
|
||||
title: React.PropTypes.string,
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="mx_RoomHeader" >
|
||||
{ header }
|
||||
<div className="mx_RoomHeader_wrapper">
|
||||
<div className="mx_RoomHeader_simpleHeader">
|
||||
{ this.props.title }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue