mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-16 02:02:10 +03:00
27 lines
756 B
JavaScript
27 lines
756 B
JavaScript
|
|
import React from 'react'; // eslint-disable-line no-unused-vars
|
|
import PropTypes from 'prop-types';
|
|
|
|
//see src/resizer for the actual resizing code, this is just the DOM for the resize handle
|
|
const ResizeHandle = (props) => {
|
|
const classNames = ['mx_ResizeHandle'];
|
|
if (props.vertical) {
|
|
classNames.push('mx_ResizeHandle_vertical');
|
|
} else {
|
|
classNames.push('mx_ResizeHandle_horizontal');
|
|
}
|
|
if (props.reverse) {
|
|
classNames.push('mx_ResizeHandle_reverse');
|
|
}
|
|
return (
|
|
<div className={classNames.join(' ')} data-id={props.id}><div /></div>
|
|
);
|
|
};
|
|
|
|
ResizeHandle.propTypes = {
|
|
vertical: PropTypes.bool,
|
|
reverse: PropTypes.bool,
|
|
id: PropTypes.string,
|
|
};
|
|
|
|
export default ResizeHandle;
|