Skip to content

Commit d7a427a

Browse files
committed
Reverse arrow on right panel so it makes logical sense
1 parent f502b23 commit d7a427a

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/reactComponents/CodeDisplay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export default function CodeDisplay(props: CodeDisplayProps): React.JSX.Element
121121
<SiderCollapseTrigger
122122
collapsed={props.isCollapsed || false}
123123
onToggle={props.onToggleCollapse}
124+
isRightPanel={true}
124125
/>
125126
);
126127
};

src/reactComponents/SiderCollapseTrigger.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { useTranslation } from 'react-i18next';
2727
interface SiderCollapseTriggerProps {
2828
collapsed: boolean;
2929
onToggle: () => void;
30+
isRightPanel?: boolean;
3031
}
3132

3233
/**
@@ -64,10 +65,17 @@ export default function SiderCollapseTrigger(props: SiderCollapseTriggerProps):
6465
onMouseLeave={() => setIsHovered(false)}
6566
>
6667
<Antd.Tooltip title={props.collapsed ? t("EXPAND") : t("COLLAPSE")}>
67-
{props.collapsed ?
68-
<RightOutlined style={{ fontSize: '12px', color: 'inherit' }} /> :
69-
<LeftOutlined style={{ fontSize: '12px', color: 'inherit' }} />
70-
}
68+
{props.isRightPanel ? (
69+
// Right panel: reversed arrows
70+
props.collapsed ?
71+
<LeftOutlined style={{ fontSize: '12px', color: 'inherit' }} /> :
72+
<RightOutlined style={{ fontSize: '12px', color: 'inherit' }} />
73+
) : (
74+
// Left panel: normal arrows
75+
props.collapsed ?
76+
<RightOutlined style={{ fontSize: '12px', color: 'inherit' }} /> :
77+
<LeftOutlined style={{ fontSize: '12px', color: 'inherit' }} />
78+
)}
7179
</Antd.Tooltip>
7280
</div>
7381
);

0 commit comments

Comments
 (0)