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