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({ resizer.setClassNames({
handle: "mx_ResizeHandle", handle: "mx_ResizeHandle",
vertical: "mx_ResizeHandle_vertical", vertical: "mx_ResizeHandle_vertical",
reverse: "mx_ResizeHandle_reverse",
}); });
return resizer; 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 //see src/resizer for the actual resizing code, this is just the DOM for the resize handle
interface IResizeHandleProps { interface IResizeHandleProps {
vertical?: boolean; vertical?: boolean;
reverse?: boolean;
id?: string; id?: string;
passRef?: React.RefObject<HTMLDivElement>; 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"]; const classNames = ["mx_ResizeHandle"];
if (vertical) { if (vertical) {
classNames.push("mx_ResizeHandle_vertical"); classNames.push("mx_ResizeHandle_vertical");
} else { } else {
classNames.push("mx_ResizeHandle_horizontal"); classNames.push("mx_ResizeHandle_horizontal");
} }
if (reverse) {
classNames.push("mx_ResizeHandle_reverse");
}
return ( return (
<div ref={passRef} className={classNames.join(" ")} data-id={id}> <div ref={passRef} className={classNames.join(" ")} data-id={id}>
<div /> <div />

View file

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