2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Tweak expand icon for panels (#9905)

- Better layout
- Add tooltip
- Add divider
This commit is contained in:
Oliver
2025-06-30 13:14:37 +10:00
committed by GitHub
parent 52997d022a
commit 8c6cacae66

View File

@ -269,22 +269,28 @@ function BasePanelGroup({
)}
</Box>
))}
{collapsible && <Divider />}
{collapsible && (
<Group wrap='nowrap' gap='xs'>
<ActionIcon
style={{
paddingLeft: '10px'
}}
onClick={() => setExpanded(!expanded)}
variant='transparent'
size='md'
<Tooltip
position='right'
label={expanded ? t`Collapse panels` : t`Expand panels`}
>
{expanded ? (
<IconLayoutSidebarLeftCollapse opacity={0.5} />
) : (
<IconLayoutSidebarRightCollapse opacity={0.5} />
)}
</ActionIcon>
<ActionIcon
style={{
paddingLeft: '10px'
}}
onClick={() => setExpanded(!expanded)}
variant='transparent'
size='lg'
>
{expanded ? (
<IconLayoutSidebarLeftCollapse opacity={0.75} />
) : (
<IconLayoutSidebarRightCollapse opacity={0.75} />
)}
</ActionIcon>
</Tooltip>
{pluginPanelSet.isLoading && <Loader size='xs' />}
</Group>
)}