diff --git a/assets/stylesheets/App.css b/assets/stylesheets/App.css index 96d4d41..cd9657e 100644 --- a/assets/stylesheets/App.css +++ b/assets/stylesheets/App.css @@ -196,6 +196,7 @@ code { /* --- Start of src/index.css --- */ body { margin: 0; + overflow: hidden; } .ant-modal-mask { @@ -602,3 +603,32 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton { min-width: 0; height: 20px; } + +.sidebar-scroll .simplebar-track.simplebar-vertical { + right: -1px; + width: 0px !important; + transition: + width 0.15s ease-in-out, + right 0.15s ease-in-out; +} + +.sidebar-scroll.dark .simplebar-track.simplebar-vertical { + background-color: #141414; + border-inline-end: 1px solid rgba(253, 253, 253, 0.12); + border-bottom: 1px solid rgba(253, 253, 253, 0.12); + border-radius: 0 0 5px 0; +} + +.sidebar-scroll.simplebar-scrolling .simplebar-track.simplebar-vertical { + width: 10px !important; + right: -11px; +} + +.sidebar-scroll + .simplebar-track.simplebar-vertical + .simplebar-scrollbar:before { + top: 3px; + bottom: 3px; + left: 3px; + right: 3px; +} diff --git a/src/components/Dashboard/common/DashboardSidebar.jsx b/src/components/Dashboard/common/DashboardSidebar.jsx index 0ebf0a6..072e3c6 100644 --- a/src/components/Dashboard/common/DashboardSidebar.jsx +++ b/src/components/Dashboard/common/DashboardSidebar.jsx @@ -8,6 +8,8 @@ import { useNavigate } from 'react-router-dom' import PropTypes from 'prop-types' import { ElectronContext } from '../context/ElectronContext' import { getSidebarIconNode } from '../../Icons/sidebarIconMap' +import SimpleBar from 'simplebar-react' +import { useThemeContext } from '../context/ThemeContext' const { Sider } = Layout const DashboardSidebar = ({ @@ -24,7 +26,7 @@ const DashboardSidebar = ({ }) const isMobile = useMediaQuery({ maxWidth: 768 }) const navigate = useNavigate() - + const { isDarkMode } = useThemeContext() const { isElectron } = useContext(ElectronContext) useEffect(() => { @@ -90,11 +92,14 @@ const DashboardSidebar = ({ className={isElectron ? 'electron-sider' : ''} > -
+ -
+