Remove unused prop from ResizeHandle - reverse (#10771)

It was added by 928b6d47c8 and soon deprecated by e5d1b3328c
This commit is contained in:
Suguru Hirahara 2023-05-03 12:25:33 +00:00 committed by GitHub
parent 9b7e7864c9
commit 62569e209e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View file

@ -265,7 +265,6 @@ class LoggedInView extends React.Component<IProps, IState> {
resizer.setClassNames({
handle: "mx_ResizeHandle",
vertical: "mx_ResizeHandle_vertical",
reverse: "mx_ResizeHandle_reverse",
});
return resizer;
}

View file

@ -19,21 +19,17 @@ import React from "react"; // eslint-disable-line no-unused-vars
//see src/resizer for the actual resizing code, this is just the DOM for the resize handle
interface IResizeHandleProps {
vertical?: boolean;
reverse?: boolean;
id?: string;
passRef?: React.RefObject<HTMLDivElement>;
}
const ResizeHandle: React.FC<IResizeHandleProps> = ({ vertical, reverse, id, passRef }) => {
const ResizeHandle: React.FC<IResizeHandleProps> = ({ vertical, id, passRef }) => {
const classNames = ["mx_ResizeHandle"];
if (vertical) {
classNames.push("mx_ResizeHandle_vertical");
} else {
classNames.push("mx_ResizeHandle_horizontal");
}
if (reverse) {
classNames.push("mx_ResizeHandle_reverse");
}
return (
<div ref={passRef} className={classNames.join(" ")} data-id={id}>
<div />

View file

@ -110,7 +110,6 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
const classNames = {
handle: "mx_ResizeHandle",
vertical: "mx_ResizeHandle_vertical",
reverse: "mx_ResizeHandle_reverse",
};
const collapseConfig = {
onResizeStart: () => {
@ -267,7 +266,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
if (i < 1) return app;
return (
<React.Fragment key={app.key}>
<ResizeHandle reverse={i > apps.length / 2} />
<ResizeHandle />
{app}
</React.Fragment>
);