mirror of https://github.com/vector-im/riot-web
Pass SimpleRoomHeader title in as a named property
... rather than a childpull/21833/head
parent
0d261c37c2
commit
1f2ba87ff5
|
@ -255,9 +255,7 @@ module.exports = React.createClass({
|
|||
|
||||
return (
|
||||
<div className="mx_CreateRoom">
|
||||
<SimpleRoomHeader>
|
||||
Create room
|
||||
</SimpleRoomHeader>
|
||||
<SimpleRoomHeader title="CreateRoom" />
|
||||
<div className="mx_CreateRoom_body">
|
||||
<input type="text" ref="room_name" value={this.state.room_name} onChange={this.onNameChange} placeholder="Name"/> <br />
|
||||
<textarea className="mx_CreateRoom_description" ref="topic" value={this.state.topic} onChange={this.onTopicChange} placeholder="Topic"/> <br />
|
||||
|
|
|
@ -331,9 +331,7 @@ module.exports = React.createClass({
|
|||
|
||||
return (
|
||||
<div className="mx_UserSettings">
|
||||
<SimpleRoomHeader>
|
||||
Settings
|
||||
</SimpleRoomHeader>
|
||||
<SimpleRoomHeader title="Settings"/>
|
||||
|
||||
<GeminiScrollbar className="mx_UserSettings_body" autoshow={true}>
|
||||
|
||||
|
|
|
@ -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…
Reference in New Issue