Skip to content

Commit f8e0886

Browse files
committed
feat: introduce SIDE_PANEL_ASIDE_DRAG_HANDLE constant
1 parent dfea332 commit f8e0886

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/components/common/SidePanel/SidePanel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
useTheme,
1212
} from '@devtron-labs/devtron-fe-common-lib'
1313

14-
import { SIDE_PANEL_MAX_ASIDE_WIDTH, SIDE_PANEL_MIN_ASIDE_WIDTH } from './constants'
14+
import { SIDE_PANEL_ASIDE_DRAG_HANDLE, SIDE_PANEL_MAX_ASIDE_WIDTH, SIDE_PANEL_MIN_ASIDE_WIDTH } from './constants'
1515
import { SidePanelDocumentation } from './SidePanelDocumentation'
1616
import { SidePanelProps } from './types'
1717

@@ -70,8 +70,8 @@ export const SidePanel = ({ asideWidth }: SidePanelProps) => {
7070
className="flexbox"
7171
>
7272
<Draggable
73-
handle=".aside-drag"
74-
defaultClassNameDragging="aside-drag--dragging"
73+
handle={`.${SIDE_PANEL_ASIDE_DRAG_HANDLE}`}
74+
defaultClassNameDragging={`${SIDE_PANEL_ASIDE_DRAG_HANDLE}--dragging`}
7575
axis="none"
7676
position={{
7777
x: 0,
@@ -85,7 +85,7 @@ export const SidePanel = ({ asideWidth }: SidePanelProps) => {
8585
onStart={handleDragStart}
8686
onStop={handleDragStop}
8787
>
88-
<div className="aside-drag flex px-5 dc__cursor-col-resize dc__zi-10">
88+
<div className={`${SIDE_PANEL_ASIDE_DRAG_HANDLE} flex px-5 dc__cursor-col-resize dc__zi-10`}>
8989
<div className="aside-drag__handle px-1 br-1" />
9090
</div>
9191
</Draggable>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export const SIDE_PANEL_MIN_ASIDE_WIDTH = 362
22

33
export const SIDE_PANEL_MAX_ASIDE_WIDTH = 525
4+
5+
export const SIDE_PANEL_ASIDE_DRAG_HANDLE = 'aside-drag'

0 commit comments

Comments
 (0)