Skip to content

Commit 3b41595

Browse files
committed
feat: SidePanel - update styles
1 parent 7485874 commit 3b41595

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.aside-drag {
2+
&__handle {
3+
height: 32px;
4+
background-color: var(--white-40);
5+
transition: all 0.2s;
6+
}
7+
8+
&:hover, &--dragging {
9+
.aside-drag__handle {
10+
height: 48px;
11+
background-color: var(--white);
12+
}
13+
}
14+
}

src/components/common/SidePanel/SidePanel.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { useState } from 'react'
22
// eslint-disable-next-line import/no-extraneous-dependencies
33
import Draggable, { DraggableEventHandler } from 'react-draggable'
44

5-
import { AnimatePresence, motion, useMainContext } from '@devtron-labs/devtron-fe-common-lib'
5+
import { AnimatePresence, AppThemeType, motion, useMainContext, useTheme } from '@devtron-labs/devtron-fe-common-lib'
66

77
import { SidePanelDocumentation } from './SidePanelDocumentation'
88
import { SidePanelProps } from './types'
99

10+
import './SidePanel.scss'
11+
1012
const MAX_ASIDE_WIDTH = 525
1113
const MIN_ASIDE_WIDTH = 350
1214

@@ -15,6 +17,7 @@ export const SidePanel = ({ asideWidth, setAsideWidth }: SidePanelProps) => {
1517
const [contentOverlay, setContentOverlay] = useState(false)
1618

1719
// HOOKS
20+
const { appTheme } = useTheme()
1821
const { sidePanelConfig, setSidePanelConfig } = useMainContext()
1922

2023
const { open } = sidePanelConfig
@@ -69,7 +72,7 @@ export const SidePanel = ({ asideWidth, setAsideWidth }: SidePanelProps) => {
6972
stiffness: 300,
7073
damping: 30,
7174
}}
72-
className="dc__position-rel mt-8 mr-8 mb-8 border__primary br-6 bg__primary flexbox-col dc__overflow-hidden"
75+
className={`dc__position-rel mt-8 mr-8 mb-8 br-6 bg__primary flexbox-col dc__overflow-hidden ${appTheme === AppThemeType.dark ? 'border__primary-translucent' : ''}`}
7376
>
7477
{contentOverlay && <div className="dc__position-abs w-100 h-100 dc__zi-1" />}
7578
<SidePanelDocumentation onClose={handleClose} />

src/components/common/SidePanel/SidePanelDocumentation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
5555
title="side-panel-documentation"
5656
loading="lazy"
5757
className="dc__no-border"
58-
src={`${docLink}?theme=${appTheme}`}
58+
src={`${docLink}&theme=${appTheme}`}
5959
width="100%"
6060
height="100%"
6161
/>

src/components/common/navigation/navigation.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,3 @@
343343
/* window-bg */
344344
background: var(--bg-tertiary);
345345
}
346-
347-
.aside-drag {
348-
&__handle {
349-
height: 32px;
350-
background-color: var(--white-40);
351-
transition: all 0.2s;
352-
}
353-
354-
&:hover, &--dragging {
355-
.aside-drag__handle {
356-
height: 48px;
357-
background-color: var(--B500);
358-
}
359-
}
360-
}

0 commit comments

Comments
 (0)