Enhance Dashboard Sidebar Layout and Button Interaction

- Added a Divider component to improve visual separation within the DashboardSidebar.
- Refactored the button layout to ensure full-width styling and better alignment, enhancing user interaction when collapsing or expanding the sidebar.
- Updated Flex container properties for improved responsiveness and layout consistency.
This commit is contained in:
Tom Butcher 2026-08-20 22:34:35 +01:00
parent c4b4a88434
commit 3b00d86531

View File

@ -5,7 +5,7 @@ import {
useEffect, useEffect,
useContext useContext
} from 'react' } from 'react'
import { Layout, Menu, Flex, Button } from 'antd' import { Layout, Menu, Flex, Button, Divider } from 'antd'
import { CaretDownFilled } from '@ant-design/icons' import { CaretDownFilled } from '@ant-design/icons'
import CollapseSidebarIcon from '../../Icons/CollapseSidebarIcon' import CollapseSidebarIcon from '../../Icons/CollapseSidebarIcon'
import ExpandSidebarIcon from '../../Icons/ExpandSidebarIcon' import ExpandSidebarIcon from '../../Icons/ExpandSidebarIcon'
@ -152,14 +152,18 @@ const DashboardSidebar = ({
_internalDisableMenuItemTitleTooltip _internalDisableMenuItemTitleTooltip
/> />
</SimpleBar> </SimpleBar>
<Flex style={{ padding: '4px', width: '100%' }}>
<Button <Flex vertical style={{ width: '100%' }}>
size={isElectron ? 'middle' : 'large'} <Divider style={{ margin: 0 }} />
type='text' <Flex style={{ padding: '4px', width: '100%' }}>
icon={collapsed ? <ExpandSidebarIcon /> : <CollapseSidebarIcon />} <Button
style={{ flexGrow: 1 }} size={isElectron ? 'middle' : 'large'}
onClick={() => handleCollapse(!collapsed)} type='text'
/> icon={collapsed ? <ExpandSidebarIcon /> : <CollapseSidebarIcon />}
style={{ flexGrow: 1, width: '100%' }}
onClick={() => handleCollapse(!collapsed)}
/>
</Flex>
</Flex> </Flex>
</Flex> </Flex>
</Sider> </Sider>