2018-09-24 15:07:42 +00:00
|
|
|
|
|
|
|
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 (
|
2018-12-14 16:06:00 +00:00
|
|
|
<div className={classNames.join(' ')} data-id={props.id}><div /></div>
|
2018-09-24 15:07:42 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
ResizeHandle.propTypes = {
|
|
|
|
vertical: PropTypes.bool,
|
|
|
|
reverse: PropTypes.bool,
|
2018-12-18 13:31:38 +00:00
|
|
|
id: PropTypes.string,
|
2018-09-24 15:07:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default ResizeHandle;
|