Skip to content

Commit a7f0b11

Browse files
committed
Add generic element context menu / popover.
1 parent 7924a14 commit a7f0b11

2 files changed

Lines changed: 37 additions & 3 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
Copyright 2017 New Vector Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
'use strict';
18+
19+
import React from 'react';
20+
import PropTypes from 'prop-types';
21+
22+
export default class GenericElementContextMenu extends React.Component {
23+
static PropTypes = {
24+
element: PropTypes.element.isRequired,
25+
};
26+
27+
render() {
28+
return <div>{ this.props.element }</div>;
29+
}
30+
}

‎src/skins/vector/css/matrix-react-sdk/views/rooms/_MessageComposer.scss‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ limitations under the License.
258258
overflow: hidden;
259259
}
260260

261-
// Set z-index for popovers
262-
.another-react-popover-container {
263-
z-index: 1000;
261+
.mx_StickersContentPlaceholder {
262+
display: flex;
263+
flex-grow: 1;
264+
flex-direction: column;
265+
align-items: center;
266+
justify-content: center;
267+
text-align: center;
264268
}

0 commit comments

Comments
 (0)