File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff 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 } ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { useTranslation } from 'react-i18next';
2727interface 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 ) ;
You can’t perform that action at this time.
0 commit comments