mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
apply CSS to slashcommand autocompletes
This commit is contained in:
parent
42dc1be341
commit
4430e16707
1 changed files with 4 additions and 2 deletions
|
@ -18,6 +18,7 @@ limitations under the License.
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
var MatrixClientPeg = require("../../../MatrixClientPeg");
|
||||||
|
var CommandEntry = require("../../../TabCompleteEntries").CommandEntry;
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'TabCompleteBar',
|
displayName: 'TabCompleteBar',
|
||||||
|
@ -31,8 +32,9 @@ module.exports = React.createClass({
|
||||||
<div className="mx_TabCompleteBar">
|
<div className="mx_TabCompleteBar">
|
||||||
{this.props.entries.map(function(entry, i) {
|
{this.props.entries.map(function(entry, i) {
|
||||||
return (
|
return (
|
||||||
<div key={entry.getKey() || i + ""} className="mx_TabCompleteBar_item"
|
<div key={entry.getKey() || i + ""}
|
||||||
onClick={entry.onClick.bind(entry)} >
|
className={ "mx_TabCompleteBar_item " + (entry instanceof CommandEntry ? "mx_TabCompleteBar_command" : "") }
|
||||||
|
onClick={entry.onClick.bind(entry)} >
|
||||||
{entry.getImageJsx()}
|
{entry.getImageJsx()}
|
||||||
<span className="mx_TabCompleteBar_text">
|
<span className="mx_TabCompleteBar_text">
|
||||||
{entry.getText()}
|
{entry.getText()}
|
||||||
|
|
Loading…
Reference in a new issue