Merge pull request #651 from matrix-org/rav/roomheader_theming_fix
Fix dark theme styling of roomheader cancel button
This commit is contained in:
commit
12642bdf2b
2 changed files with 22 additions and 10 deletions
|
@ -27,6 +27,7 @@ var linkify = require('linkifyjs');
|
||||||
var linkifyElement = require('linkifyjs/element');
|
var linkifyElement = require('linkifyjs/element');
|
||||||
var linkifyMatrix = require('../../../linkify-matrix');
|
var linkifyMatrix = require('../../../linkify-matrix');
|
||||||
import AccessibleButton from '../elements/AccessibleButton';
|
import AccessibleButton from '../elements/AccessibleButton';
|
||||||
|
import {CancelButton} from './SimpleRoomHeader';
|
||||||
|
|
||||||
linkifyMatrix(linkify);
|
linkifyMatrix(linkify);
|
||||||
|
|
||||||
|
@ -184,7 +185,7 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
|
|
||||||
save_button = <AccessibleButton className="mx_RoomHeader_textButton" onClick={this.props.onSaveClick}>Save</AccessibleButton>;
|
save_button = <AccessibleButton className="mx_RoomHeader_textButton" onClick={this.props.onSaveClick}>Save</AccessibleButton>;
|
||||||
cancel_button = <AccessibleButton className="mx_RoomHeader_cancelButton" onClick={this.props.onCancelClick}><img src="img/cancel.svg" width="18" height="18" alt="Cancel"/> </AccessibleButton>;
|
cancel_button = <CancelButton onClick={this.props.onCancelClick}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.saving) {
|
if (this.props.saving) {
|
||||||
|
|
|
@ -16,16 +16,27 @@ limitations under the License.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
import React from 'react';
|
||||||
var sdk = require('../../../index');
|
import dis from '../../../dispatcher';
|
||||||
var dis = require("../../../dispatcher");
|
|
||||||
import AccessibleButton from '../elements/AccessibleButton';
|
import AccessibleButton from '../elements/AccessibleButton';
|
||||||
|
|
||||||
|
// cancel button which is shared between room header and simple room header
|
||||||
|
export function CancelButton(props) {
|
||||||
|
const {onClick} = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AccessibleButton className='mx_RoomHeader_cancelButton' onClick={onClick}>
|
||||||
|
<img src="img/cancel.svg" className='mx_filterFlipColor'
|
||||||
|
width="18" height="18" alt="Cancel"/>
|
||||||
|
</AccessibleButton>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A stripped-down room header used for things like the user settings
|
* A stripped-down room header used for things like the user settings
|
||||||
* and room directory.
|
* and room directory.
|
||||||
*/
|
*/
|
||||||
module.exports = React.createClass({
|
export default React.createClass({
|
||||||
displayName: 'SimpleRoomHeader',
|
displayName: 'SimpleRoomHeader',
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
@ -41,15 +52,15 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var TintableSvg = sdk.getComponent("elements.TintableSvg");
|
let cancelButton;
|
||||||
|
|
||||||
var cancelButton;
|
|
||||||
if (this.props.onCancelClick) {
|
if (this.props.onCancelClick) {
|
||||||
cancelButton = <AccessibleButton className="mx_RoomHeader_cancelButton" onClick={this.props.onCancelClick}><img src="img/cancel.svg" width="18" height="18" alt="Cancel"/> </AccessibleButton>;
|
cancelButton = <CancelButton onClick={this.props.onCancelClick} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
var showRhsButton;
|
let showRhsButton;
|
||||||
/* // don't bother cluttering things up with this for now.
|
/* // don't bother cluttering things up with this for now.
|
||||||
|
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||||
|
|
||||||
if (this.props.collapsedRhs) {
|
if (this.props.collapsedRhs) {
|
||||||
showRhsButton =
|
showRhsButton =
|
||||||
<div className="mx_RoomHeader_button" style={{ float: 'right' }} onClick={this.onShowRhsClick} title=">">
|
<div className="mx_RoomHeader_button" style={{ float: 'right' }} onClick={this.onShowRhsClick} title=">">
|
||||||
|
|
Loading…
Reference in a new issue