mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Make collapsed sidebar navigation configurable
This commit is contained in:
parent
8cbc25a932
commit
47dc83f360
3 changed files with 43 additions and 20 deletions
|
|
@ -95,7 +95,7 @@ const sidebarItemMap = {
|
|||
export const CollapsedSidebar = () => {
|
||||
const navigate = useNavigate();
|
||||
const { windowBarStyle } = useWindowSettings();
|
||||
const { sidebarItems } = useGeneralSettings();
|
||||
const { sidebarItems, sidebarCollapsedNavigation } = useGeneralSettings();
|
||||
|
||||
const sidebarItemsWithRoute: (SidebarItemType & {
|
||||
activeIcon: IconType;
|
||||
|
|
@ -119,26 +119,28 @@ export const CollapsedSidebar = () => {
|
|||
scrollHideDelay={0}
|
||||
scrollbarSize={8}
|
||||
>
|
||||
<Group
|
||||
grow
|
||||
spacing={0}
|
||||
style={{
|
||||
borderRight: 'var(--sidebar-border)',
|
||||
}}
|
||||
>
|
||||
<CollapsedSidebarButton
|
||||
component={UnstyledButton}
|
||||
onClick={() => navigate(-1)}
|
||||
{sidebarCollapsedNavigation && (
|
||||
<Group
|
||||
grow
|
||||
spacing={0}
|
||||
style={{
|
||||
borderRight: 'var(--sidebar-border)',
|
||||
}}
|
||||
>
|
||||
<RiArrowLeftSLine size="22" />
|
||||
</CollapsedSidebarButton>
|
||||
<CollapsedSidebarButton
|
||||
component={UnstyledButton}
|
||||
onClick={() => navigate(1)}
|
||||
>
|
||||
<RiArrowRightSLine size="22" />
|
||||
</CollapsedSidebarButton>
|
||||
</Group>
|
||||
<CollapsedSidebarButton
|
||||
component={UnstyledButton}
|
||||
onClick={() => navigate(-1)}
|
||||
>
|
||||
<RiArrowLeftSLine size="22" />
|
||||
</CollapsedSidebarButton>
|
||||
<CollapsedSidebarButton
|
||||
component={UnstyledButton}
|
||||
onClick={() => navigate(1)}
|
||||
>
|
||||
<RiArrowRightSLine size="22" />
|
||||
</CollapsedSidebarButton>
|
||||
</Group>
|
||||
)}
|
||||
<DropdownMenu position="right-start">
|
||||
<DropdownMenu.Target>
|
||||
<CollapsedSidebarItem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue