differentiate style based on preview or not

pull/21833/head
Bruno Windels 2019-04-12 12:54:13 +02:00
parent 16ed06cebb
commit 01e9de9a3a
2 changed files with 11 additions and 1 deletions

View File

@ -28,6 +28,10 @@ limitations under the License.
-webkit-align-items: center;
}
.mx_RoomPreviewBar_dialog {
margin: auto;
}
.mx_RoomPreviewBar_join_text {
color: $warning-color;
}

View File

@ -21,6 +21,7 @@ const React = require('react');
import PropTypes from 'prop-types';
const sdk = require('../../../index');
const MatrixClientPeg = require('../../../MatrixClientPeg');
import classNames from 'classnames';
import { _t } from '../../../languageHandler';
@ -234,8 +235,13 @@ module.exports = React.createClass({
);
}
const classes = classNames("mx_RoomPreviewBar", "dark-panel", {
"mx_RoomPreviewBar_panel": this.props.canPreview,
"mx_RoomPreviewBar_dialog": !this.props.canPreview,
});
return (
<div className="mx_RoomPreviewBar dark-panel">
<div className={classes}>
<div className="mx_RoomPreviewBar_wrapper">
{ joinBlock }
{ previewBlock }